Cool! Thanks for the followup. For me this works as well:
mkvirtualenv --python=/usr/bin/python3.4 SampleVirtualEnv
pip3.4 install django==1.7.1
Note it works regardless of where your current working directory is. There was one line of background setup to make this so easy- but once you do it, you won't ever need to do it again!
- add
source virtualenvwrapper.sh
to your bashrc, so that you can use all the mkvirtualenv
etc goodies
Other goodies include the fact that you can workon SampleVirtualEnv
to open the virtualenv instead of cd-ing and sourcing bin/activate every single time.
A couple notes:
- When you mkvirtualenv, the SampleVirtualEnv
/bin
and /lib
stuff will by default be created in ~/.virtualenvs/SampleVirtualEnv
, and it will automatically workon SampleVirtualEnv (source bin/activate) for you afterwards.
- For good practice/easier debugging next time, you want to specify python3.4 instead of python3, and pip3.4 instead of pip, just to make sure there are no mixups. running pip3 SHOULD default to pip3.4 but you never know if you changed some setting somewhere to make it default to pip3.3