[英]How to install Pip3 pointing a custom installation of Python3 in Ubuntu?
I'm using Ubuntu 17.04 and it has Python 2.7.13 installed. 我正在使用Ubuntu 17.04,并且已安装Python 2.7.13。 I want to use Python 3 without it colliding with Python 2.7.13.
我想使用Python 3而不与Python 2.7.13冲突。
I've installed and built Python 3 from source and aliased it without an issue. 我已经从源代码安装并构建了Python 3,并且对其进行了别名没有问题。 Right now
python
is pointing to usr/bin/python
which is the system default, and I aliased python3
to point my custom installation in ~/Python-3.6.3"
. 现在,
python
指向系统默认的usr/bin/python
,并且我将python3
别名为~/Python-3.6.3"
。
The next step I'm having problems with is installing pip3
. 我遇到的下一步是安装
pip3
。 If I install it via apt install python3-pip
I'm afraid it will try to download packages to the older version of Python. 如果我通过
apt install python3-pip
安装它,恐怕它将尝试将软件包下载到旧版本的Python。 Is there a way to install pip3 in the setup I've described and point it to my custom installation of Python 3? 有没有一种方法可以在上述安装中安装pip3,并将其指向自定义安装的Python 3?
You can follow these directions to download a file called get-pip.py. 您可以按照以下说明下载名为get-pip.py的文件。 You simply run this command with the target python installation.
您只需在目标python安装中运行此命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.