美文网首页
python3 通过 virtualenv 安装虚拟环境

python3 通过 virtualenv 安装虚拟环境

作者: Sunnky | 来源:发表于2017-11-03 14:45 被阅读0次

当我们用python3 -m venv venv安装虚拟环境报错时

ubuntu@ubuntu-System-Product-Name:~/coffee/coffee_control$ python3 -m venv venv
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/ubuntu/coffee/coffee_control/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']

可以用下面的方式:

virtualenv -p python3 venv

相关文章

网友评论

      本文标题:python3 通过 virtualenv 安装虚拟环境

      本文链接:https://www.haomeiwen.com/subject/sgetmxtx.html