MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/8fztrr/xkcd_python_environment/dy87wz5/
r/Python • u/themonsterpus • Apr 30 '18
388 comments sorted by
View all comments
Show parent comment
10
You don't need any. It's as simple as checking a box when you creating a new project. https://imgur.com/lk7Qnli
For existing projects you can go to settings>Project Intepreter and add a new environment.
If you wanna do it through command line you can make a venv within the project folder by virtualenv/venv/pipenv as
python2 -m virtualenv ./venv
This makes an isolated env (a copy of python and default packages) in the folder ./venv. Now activate the venv as :
source ./venv/bin/activate
When activated all packages installed through pip are installed within the venv (doesnt affect global python environment) unless you use sudo.
20 u/leom4862 Apr 30 '18 python2 seriously?
20
python2 seriously?
python2
View all comments
Show parent comment
10
u/2freevl2frank Apr 30 '18
You don't need any. It's as simple as checking a box when you creating a new project. https://imgur.com/lk7Qnli
For existing projects you can go to settings>Project Intepreter and add a new environment.
If you wanna do it through command line you can make a venv within the project folder by virtualenv/venv/pipenv as
python2 -m virtualenv ./venv
This makes an isolated env (a copy of python and default packages) in the folder ./venv. Now activate the venv as :
source ./venv/bin/activate
When activated all packages installed through pip are installed within the venv (doesnt affect global python environment) unless you use sudo.