Reputation: 793
i just started learning django and i am very confused in how to set up a virtual environment.
i have successfully installed python:
When i run python --version
i get
Python 3.8.1
and when i run python3 --version
i get
Python 3.8.1
My first problem is when i run which -a python3
i get this
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
/usr/local/bin/python3
/usr/bin/python3
Can someone help me understand why i have 3 locations where python3 exist?
My 2nd problem is i have successfully installed virtaulenv
and virtualenvwrapper
when i run virtualenv --version
i get:
virtualenv 20.4.3 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/virtualenv/__init__.py
and when i run virtualenvwrapper --version
i get:
-bash: virtualenvwrapper: command not found
thats why when i run mkvirtualenv test
i keep getting command not found.
My third problem is what is the difference between virtualenv test
and mkvirtualenv test
?
Upvotes: 0
Views: 1702
Reputation: 57
If you are using Ubuntu you can follow the steps below
python -m venv env
source env/bin/activate
env is the name of environment.Upvotes: 1