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?
/usr/local/binand/usr/bin/... and list python3... you will find that there is a soft link. These all python3 will link to the same binary python.ls -ld python3... in/usr/local/binand/usr/bin/path.../usr/local/bini getlrwxr-xr-x 1 root wheel 69 26 Jan 2020 python3 -> ../../../Library/Frameworks/Python.framework/Versions/3.8/bin/python3and for/usr/bin/i get-rwxr-xr-x 1 root wheel 31488 22 Sep 2020 python3they are not the same, why?/usr/binis distribution managed./usr/local/binis not a distribution managed, but a locally package installation. It is not recommended to install your local packages in/usr/binotherwise it some updates on distribution managed will be impacted... Now if you doecho $PATH. you will see that/usr/local/binwill come before/usr/bin.. so that you can use you local package, and if local package is not found then system will take it from/usr/locali.e. from distribution manager.