美文网首页
install pip for Python 2.6 on OS

install pip for Python 2.6 on OS

作者: 顽童大了已没那么笨 | 来源:发表于2016-10-13 11:14 被阅读40次

Download the source file here. Then do

$  cd ~/Downloads
$  tar -xzvf pip-7.0.1.tar.gz 

(replacing ~/Downloads if necessary). Then

$ cd pip-7.0.1
$ sudo python2.6 setup.py install
$ cd

(the last cd is used to leave the build directory). Now you should be able to run

$ python2.6 -c 'import pip;print pip.__version__'
 7.0.1

By default, pip (when installed from source) should be installed into /usr/local/bin. To check:

$ /usr/local/bin/pip --version
pip 7.0.1 from /Library/Python/2.6/site-packages/pip-7.0.1-py2.6.egg (python 2.6)

Now you can install your favorite packages using

$ /usr/local/bin/pip install package
$ python2.6 -c 'import package'

相关文章

网友评论

      本文标题:install pip for Python 2.6 on OS

      本文链接:https://www.haomeiwen.com/subject/pyswyttx.html