错误消息安装虚拟环境的Python 3.5 Linux Mint的17

问题描述:

Linux Mint的17与Python 3.5.1错误消息安装虚拟环境的Python 3.5 Linux Mint的17

$ python3 -m venv ENV_DIR 

回报:

Error: Command '['/home/path/to/ENV_DIR/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

我尝试了各种方法来获得终端显示我在没有成功的venv里。

+0

欢迎堆栈Overflo w ^!我编辑了你的问题,用4个空格缩进你的代码示例,然后使用>以便它们正确呈现 - 请参阅编辑帮助以获取有关格式化的更多信息。请编辑以提供识别特定问题所需的任何其他详细信息。祝你好运! – Wtower

+0

目前还不清楚你想要做什么以及你如何到达那里,能否用更多的上下文来扩展你的问题? – renemilk

这在Ubuntu 14.04(上Linux Mint的17为主)是由于错误

您可以不pip创建虚拟环境,然后手动安装的环境中:

$ python3 -m venv --without-pip my_venv 
$ source my_venv/bin/activate 
(my_venv)$ curl https://bootstrap.pypa.io/get-pip.py | python 

或者你也可以手动在您的系统中安装ensurepip,通过适应these instructions到Python 3.5.1:

cd /usr/lib/python3.5 
sudo mkdir -p ensurepip/_bundled 

cd ensurepip 
sudo wget https://github.com/akheron/cpython/raw/v3.5.1/Lib/ensurepip/__init__.py 
sudo wget https://github.com/akheron/cpython/raw/v3.5.1/Lib/ensurepip/__main__.py 
sudo wget https://github.com/akheron/cpython/raw/v3.5.1/Lib/ensurepip/_uninstall.py 

cd _bundled 
sudo wget https://github.com/akheron/cpython/raw/v3.5.1/Lib/ensurepip/_bundled/pip-1.5.4-py2.py3-none-any.whl 
sudo wget https://github.com/akheron/cpython/raw/v3.5.1/Lib/ensurepip/_bundled/setuptools-