### Installing global Python & Pip
Use Brew
brew install python
That'll install both Python, PIP and setuptools. If for some reason it didn't install PIP you can do via
curl https://bootstrap.pypa.io/get-pip.py > get-pip.py
sudo python get-pip.py
(Side note that you should install multiple versions of Python via Pyenv rather than Brew to avoid any bad Python conflicts)
pip install virtualenv virtualenvwrapper
You'll need to tell ZSH where virtualenvs need to be put
In ~/.zshrc add
# Virtualenvwrapper things
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
By default the ZSH virtualenv plugin hides the virtualenv name. I've no idea why...
nano ~/.oh-my-zsh/plugins/virtualenv/virtualenv.plugin.zsh
Within that file you'll see
# disables prompt mangling in virtual_env/bin/activate
export VIRTUAL_ENV_DISABLE_PROMPT=1
Hash out export VIRTUAL_ENV_DISABLE_PROMPT=1
and reload ZSH.
Test that all working by doing something like
~ mkvirtualenv test2
You should see
New python executable in /Users/edd/.virtualenvs/test2/bin/python2.7
Also creating executable in /Users/edd/.virtualenvs/test2/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /Users/edd/.virtualenvs/test2/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/edd/.virtualenvs/test2/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/edd/.virtualenvs/test2/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/edd/.virtualenvs/test2/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/edd/.virtualenvs/test2/bin/get_env_details
(test2) ➜ ~ pip install something_awesome_inside_my_obvious_virtualenv
not getting something like this '(test2) ➜ ~ pip install something_awesome_inside_my_obvious_virtualenv'
Ubuntu 17.10