about 1 year ago

Install Python3

  1. Install brew: http://brew.sh/
  2. Install Python3 via brew: brew install python3
  3. Vertify Python3 is installed: which python3 (should be located at: /usr/local/Cellar/python3/)

Install virtualenv and virtualenvwrapper

  1. pip3 install virtualenv virtualenvwrapper
  2. create a fold to store all of the virtual environments:
cd ~
mkdir .envs

`3. setup virtualenvwrapper by putting the following into .bash_profile:

export WORKON_HOME=~/.envs # point to the .envs fold created above
export VIRTUALENVWRAPPER_PYTHON=/usr/local/Cellar/python3/3.5.2_1/bin/python3   # make sure this is the python version you want to point to
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
source /usr/local/bin/virtualenvwrapper.sh

Then run .bash_profile to reflect the chagnes:

. ~/.bash_profile

Now everythiing should be set to go:

mkvirtualenv env_name

DONE.

← Django CSRF cookie not set Matplotlib display Chinese characters →
 
comments powered by Disqus