Use different Python version with virtualenv

后端 未结 30 3380
自闭症患者
自闭症患者 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:23

    Since Python 3, the Python Docs suggest creating the virtual environment with the following command:

    python3 -m venv 
    

    Please note that venv does not permit creating virtual environments with other versions of Python. For that, install and use the virtualenv package.


    Obsolete information

    The pyvenv script can be used to create a virtual environment

    pyvenv /path/to/new/virtual/environment
    

    but it has been deprecated since Python 3.6.

提交回复
热议问题