打开Anaconda Prompt窗口
conda update conda 先升级conda
激活要升级python的虚拟环境
conda install python=3.6.6 再升级python
conda create --name webapp python=3.6.6
conda remove --name webapp --all

ubunto14.04上自带python2.7和python3.4

要安装python3.4-venv执行sudo apt-get install python3.4-venv
先下载编译安装python3.6
#./configure --prefix=/usr/bin/python3.6 如果使用这个,需要自己创建一个软件链接ln -s /usr/bin/python3.6/bin/python3.6 /usr/bin/python36

./configure --prefix=/usr/bin

make && make install
这样执行python3 -m venv venv
就不会报Error Command: ['/home/wgetdj/WorkPlace/Programming/Python/myvenv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']

sudo apt-get install python3-venv
NOTE: On some versions of Debian/Ubuntu initiating the virtual environment like this currently gives the following error:
Error Command: ['/home/wgetdj/WorkPlace/Programming/Python/myvenv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']
To get around this, use the virtualenv command instead.
$ sudo apt-get install python-virtualenv
$ virtualenv --python=python3.6 myvenv

NOTE: If you get an error like
E: Unable to locate package python3-venv
then instead run:
sudo apt-get install python3.6-venv

相关文章:

  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2022-02-09
猜你喜欢
  • 2021-09-11
  • 2021-11-05
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案