【发布时间】:2018-05-04 07:25:59
【问题描述】:
我正在尝试使用 Python3.6 设置 venv,但收到了在其他各种帖子中已经提到的错误,例如 here。不幸的是,所提出的解决方案都没有奏效。
我已经安装了必要的包
$ sudo apt install python3.6-venv
...
$ dpkg -l | grep "python3.6-venv"
ii python3.6-venv 3.6.5-5~16.04.york0 amd64 Interactive high-level object-oriented language (pyvenv binary, version 3.6)
我还安装了python3-venv(用于python 3.5)。
现在尝试设置我收到的 venv 时
python3.6 -m venv test
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Failing command: ['/home/User/Python/test/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']
【问题讨论】:
-
太好了,Debian 开发人员真的需要尽快解决这个问题。
标签: python python-venv