- Install Python 3.7.x from https://www.python.org/downloads/ or via homebrew.
$ brew install python3 # Installed at /usr/local/Cellar/python3
Check that python3 has been installed by running it at the terminal:
$ python3
>>> Python 3.7.2
- Download
get-pip.py
from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):
$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py
- Install virtualenv and virtualenvwrapper
$ sudo -H pip3 install virtualenv
$ sudo -H pip3 install virtualenvwrapper --ignore-installed six
- Add the following to your
~/.bash_profile
to load virtualenvwrapper then runbash -l
# Location of python virtual environments
export WORKON_HOME=$HOME/.virtualenvs
if [ -e /usr/local/bin/virtualenvwrapper.sh ]; then
source /usr/local/bin/virtualenvwrapper.sh
fi
- Create your virtual enviornment named
py3
$ mkvirtualenv --python=`which python3` py3
Did you get this to work on MacOS Sierra? I cannot figure out this issue. I am pulling my hair!
ImportError: dlopen(/usr/local/lib/python3.6/site-packages/scipy/sparse/linalg/isolve/_iterative.cpython-36m-darwin.so, 2): Symbol not found: ___addtf3
Referenced from: /usr/local/lib/python3.6/site-packages/scipy/sparse/linalg/isolve/../../../.dylibs/libquadmath.0.dylib
Expected in: /usr/lib/libSystem.B.dylib