A memorandum about building a virtualenv environment in a MacOS environment When using virtualenvwrapper, make a note about how to deal with the alert that occurred when switching the work environment with the workon command.
environment
python3.x via Homebrew, virtualenv and virtualenvwrapper are installed via pip.
About alerts After building the virtualenv environment, when I started the workon command, an alert was displayed around the reference path of python.
After investigating, there were some examples of how to deal with stackoverflow. http://stackoverflow.com/questions/6968914/getting-a-python-virtual-env-error-after-installing-lion
In my environment, the alert was output because the path of Python to execute was different. So, the python used by virtualenvwrapper was changed from 2.x series to python3.x series.
Briefly ... It's OK if you put the path of Python used in virtualenv in .bash_profile.
#Setup virtual envwrapper for python in case default doesn't work
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.4
export VIRTUALENVWRAPPER_PYTHON
# needed for virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/projects
source /usr/local/bin/virtualenvwrapper.sh
Run workon from the command line, and if you don't get an alert, the fix is complete!
that's all!
Recommended Posts