将pip链接到Python 3.7时出现问题。pip
和pip3
都已安装,但链接到Python 2.7。
我尝试重新安装Python3,然后pip
没有进展。
我收到以下消息:
包python3-pip不可用,但被另一个包引用。
这可能意味着软件包丢失、已过时或只能从其他来源获得
$ python --version
Python 3.7.4
$ pip -V
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
pip 19.2.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
$ pip3 -V
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
pip 19.2.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
$ sudo apt-get install python3-pip
[sudo] password for TarikDev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python3-pip' has no installation candidate
字符串
4条答案
按热度按时间dfddblmv1#
首先使用此命令
字符串
将下载两个包,大小为16 MB。然后:
型
fhg3lkii2#
我试过这个,它对我很有效:
字符串
r1zhe5dt3#
转到你的sources.list文件,步骤如下:
字符串
现在编辑这个文件中的这一行
型
现在按CTRL+X键,然后按y保存缓冲区,然后按回车键。
现在试试
sudo apt-get update
现在键入命令
sudo apt-get install python3-pip
cqoc49vn4#
首先,使用update命令更新系统
字符串
将pip包安装到机器上
型
如果您仍然面临安装pip的挑战,请尝试以下命令:
型