Correspondence when an alert is issued by the workon command after installing virtualenv (MacOS10.10 + Python3.4)

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

Correspondence when an alert is issued by the workon command after installing virtualenv (MacOS10.10 + Python3.4)
Notify using Notification Center when the execution environment is macOS in Python
How to automatically notify by phone when the python system is down
How to build an environment when you want to use python2.7 after installing Anaconda3
When the log acquired by rsyslog is not updated after rotation with logrotate
Correspondence memo when the direction key cannot be used on the python command line
After installing php7.2, the php command does not work
Investigate the cause when an error is thrown when python3.8 is not found when using lambda-uploader with python3.8
What to do if the message "Not recognized as an internal or external command, operable program or batch file" is displayed when executing the conda command after installing Miniconda.