系统自带的默认 python 版本是 2.7.3
python -V
Python 2.7.3
但是当安装 python-pip 时,却提示需要安装 2.6:
apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-pkg-resources python-setuptools python2.6 python2.6-minimal
Suggested packages:
python-distribute python-distribute-doc python2.6-doc binfmt-support
Recommended packages:
python-dev-all
The following NEW packages will be installed:
python-pip python-pkg-resources python-setuptools python2.6
python2.6-minimal
0 upgraded, 5 newly installed, 0 to remove and 11 not upgraded.
Need to get 561 kB/4,475 kB of archives.
After this operation, 14.5 MB of additional disk space will be used.
Do you want to continue [Y/n]?
所以我用了这样的方法:
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
easy_install pip
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.