我正在尝试使用Python3.6设置虚拟环境venv,但是遇到了在各种其他帖子中已经提到的错误,例如这里。不幸的是,没有一个建议的解决方案有效。
我已经安装了必要的软件包。
我还安装了
我已经安装了必要的软件包。
$ 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)。现在尝试设置虚拟环境时,收到以下信息: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']