$ brew install python3You should then check which version is installed
$ python3 --versionOnce Python3 is installed, it comes with Pip3
Next we run the following command:
$ pip3 install virtualenv
$ pip3 install virtualenvwrapperUsually, you should have a directory where all you virtualenvs reside but in the event that you do not, run the following command:
$ mkdir ~/.virtualenvsOpen your .bashrc and add this directory to the path
export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.shActivate these changes by sourcing bash anew
$ source ~/.bashrcWe are now ready to use Python3 and virtualenv wrapper but we need to know on which path it is to use it. Run the following command to find out.
$ which python3The result most probably looks something like this /usr/local/bin/python3. With this we are ready to create virtualenvs
$ mkvirtualenv --python=/usr/local/bin/python3 mynewvirtualenvnameIt shoould now be active
$ (mynewvirtualenvname) ➜ ~You can deactivate it by simply running the deactivate command:
$ (mynewvirtualenvname) ➜ ~ deactivateI hope you found this useful. Cheers.