Use different Python version with virtualenv

后端 未结 30 3255
自闭症患者
自闭症患者 2020-11-21 05:03

I have a Debian system currently running with python 2.5.4. I got virtualenv properly installed, everything is working fine. Is there a possibility that I can use a virtuale

30条回答
  •  梦如初夏
    2020-11-21 05:41

    UBUNTU 19.04 / Global Python 3.7.

    This worked for me, enabling a Python 3.8 environment using the recommended venv for python 3 development.

    Install 3.8 and 3.8 venv module

    $ sudo apt install python3.8 python3.8-venv ## plus any other modules you need

    Create your Virtual Env using the python version you want in that env

    $ /usr/bin/python3.8 -m venv python38-env

    switch into your virtual env

    $ source python38-env/bin/activate

    python -V = python 3.8

提交回复
热议问题