概述
编译安装Python 2.7.18没有pip
pip 之于 python, 犹如 npm 之于 node.js。
问题背景;
编译安装完python2.7却发现没有pip
解决方法:
进入到编译安装python的bin目录下:
./python -m ensurepip --default-pip
如下,就会在当前bin路径下,安装好pip命令
# ./python -m ensurepip --default-pip
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in links: /tmp/tmpSQuLO1
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-19.2.3 setuptools-41.2.0
# ls
2to3 easy_install-2.7 pip pip2.7 python python2.7 python2-config smtpd.py
easy_install idle pip2 pydoc python2 python2.7-config python-config
亲测可用!
最后
以上就是清秀萝莉为你收集整理的编译安装Python 2.7.18没有pip编译安装Python 2.7.18没有pip的全部内容,希望文章能够帮你解决编译安装Python 2.7.18没有pip编译安装Python 2.7.18没有pip所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复