简体   繁体   中英

Setting up a virtual environment for python3 using virtualenv on Ubuntu

I want to learn Django so for that, as per the instructions on the website , you need to create a virtual environment. I've heard enough horror stories about people corrupting their OS cause they didn't set up the virtual environments properly so it's safe to say I'm sufficiently paranoid.

I've created a separate folder/directory VirtualE at located at Academics/CS/VirtualENV and I want to create all my virtual environments there. As per the website , the following command should be used -

virtualenv --python=`which python3` ~/.virtualenvs/djangodev

I'm not sure what exactly I should write in place of the single quotes (the which python3 part). I wrote the following -

virtualenv --python=3.5.2 ~/Academics/CS/VirtualENV/DjangoDev

It says

The path 3.5.2 (from --python=3.5.2) does not exist

Where exactly am I going wrong?

In the command line, type "which python3" and it will give you the path to python3. You just need to copy and paste that in the command. For example:

virtualenv --python=/path/to/python3/bin/python ~/Academics/CS/VirtualENV/DjangoDev

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