pip用來管理和安裝python包非常方便。怎麼簡單介紹下如何安裝pip以及pip常用命令的使用
#curl -o
#python get-pip.py
顯示如下資訊,表示安裝成功
downloading/unpacking pip
downloading pip-1.5.2-py2.py3-none-any.whl (1.2mb): 1.2mb downloaded
installing collected packages: pip
successfully installed pip
cleaning up.
用來安裝python包,例如:
#pip install pymongo
#顯示如下資訊,表示安裝成功
downloading/unpacking pymongo
downloading pymongo-2.6.3.tar.gz (324kb): 324kb downloaded
running setup.py (path:/tmp/pip_build_root/pymongo/setup.py) egg_info for package pymongo
installing collected packages: pymongo
running setup.py install for pymongo
building 'bson._cbson' extension
gcc -pthread -fno-strict-aliasing -g -o2 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -fpic -ibson -i/usr/local/include/python2.7 -c bson/_cbsonmodule.c -o build/temp.linux-x86_64-2.7/bson/_cbsonmodule.o
gcc -pthread -fno-strict-aliasing -g -o2 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -fpic -ibson -i/usr/local/include/python2.7 -c bson/time64.c -o build/temp.linux-x86_64-2.7/bson/time64.o
gcc -pthread -fno-strict-aliasing -g -o2 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -fpic -ibson -i/usr/local/include/python2.7 -c bson/buffer.c -o build/temp.linux-x86_64-2.7/bson/buffer.o
gcc -pthread -fno-strict-aliasing -g -o2 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -fpic -ibson -i/usr/local/include/python2.7 -c bson/encoding_helpers.c -o build/temp.linux-x86_64-2.7/bson/encoding_helpers.o
gcc -pthread -shared build/temp.linux-x86_64-2.7/bson/_cbsonmodule.o build/temp.linux-x86_64-2.7/bson/time64.o build/temp.linux-x86_64-2.7/bson/buffer.o build/temp.linux-x86_64-2.7/bson/encoding_helpers.o -o build/lib.linux-x86_64-2.7/bson/_cbson.so
building 'pymongo._cmessage' extension
gcc -pthread -fno-strict-aliasing -g -o2 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -fpic -ibson -i/usr/local/include/python2.7 -c pymongo/_cmessagemodule.c -o build/temp.linux-x86_64-2.7/pymongo/_cmessagemodule.o
gcc -pthread -fno-strict-aliasing -g -o2 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -fpic -ibson -i/usr/local/include/python2.7 -c bson/buffer.c -o build/temp.linux-x86_64-2.7/bson/buffer.o
gcc -pthread -shared build/temp.linux-x86_64-2.7/pymongo/_cmessagemodule.o build/temp.linux-x86_64-2.7/bson/buffer.o -o build/lib.linux-x86_64-2.7/pymongo/_cmessage.so
successfully installed pymongo
cleaning up...
顯示已經安裝的python包
解除安裝python包
公升級安裝包
pip install --upgrade ******json
requirement already up-to-date: ******json in /usr/local/lib/python2.7/site-packages
cleaning up...
參考:
pip的安裝和使用
pip類似redhat裡面的yum,安裝python包非常方便。本節詳細介紹pip的安裝 以及使用方法。wget no check certificate1.2 pip安裝 tar xzvf pip 1.5.4.tar.gz cd pip 1.5.4 python setup.py install2...
pip安裝和使用 (Python)
二 使用 問題解決 2.python 2.7.9 或 python 3.4 以上版本都自帶 pip 工具。3.pip 官網 pip version python2.x 版本命令 pip3 version python3.x 版本命令 官方 sudo python get pip.py 執行安裝指令碼...
PIP的使用 使用PIP安裝numpy
在安裝了pip之後,要將pip新增到環境變數 c python27 scripts 安裝 cd到相應的目錄後,執行命令 到相應的目錄後,執行命令pip install numpy 1.12.1rc1 cp27 none win amd64.whl d pip install numpy 1.12 1...