我按照链接@ https://linuxize.com/post/how-to-install-pip-on-centos-7/#2-install-pip安装pip,但是它是为系统附带的python 2.6安装的,我如何为python 2.7安装它?
sudo yum install epel-release
Loaded plugins: security
Setting up Install Process
Package epel-release-6-8.noarch already installed and latest version
Nothing to do
安装管
sudo yum install python-pip
Loaded plugins: security
Setting up Install Process
Package python-pip-7.1.0-1.el6.noarch already installed and latest version
Nothing to do
pip版本
pip --version
pip 7.1.0 from /usr/lib/python2.6/site-packages (python 2.6)
机器配置:
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: OracleServer
Description: Oracle Linux Server release 6.6
Release: 6.6
Codename: n/a
/usr/本机
4条答案
按热度按时间bxgwgixi1#
尝试手动安装:
fcg9iug32#
pip已经放弃了对python 2.7的支持。如果你仍然想在python 2.7中使用它,那么降低pip的级别将有助于你:
rqdpfwrv3#
在Ubuntu 20.04等较新版本中,python-pip不再是一个包。因此,旧的:
必败无疑。
以下是解决此问题的方法:
链接:https://www.how2shout.com/linux/how-to-install-python-2-7-on-ubuntu-20-04-lts-linux/
sgtfey8w4#
只需进入终端并输入:
我知道这至少对乌藨子派有效。