简体   繁体   中英

how to create virtual environment for python 2.7

I have python3 installed in my PC. I got a project requirement for which python version is 2.7. Can i create a virtual environment with python 2.7?

How can I achieve this?

yep.

Virtualenv is in your hands:

https://virtualenv.pypa.io/en/latest/installation.html

Thinkpad:~$ virtualenv -p <path to installed python 2.x /python-2.x/bin/python> venv



Thinkpad:~$ source venv/bin/activate


(venv) Thinkpad:~$

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM