- https://stackoverflow.com/questions/20454199/how-to-use-a-different-version-of-python-during-npm-install
npm install --python=python2.7
ornpm install --python=python2
- or whatever resolveswhich python2
in your shellnpm config set python python2.7
sets this permanently
- install homebrew
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
to install python 3.6.5pip3 install virtualenv
pip3 install virtualenvwrapper
Add the following to you your ~/.bash_profile
# python2 alias for osx builtin python
alias python2='/usr/bin/python'
# python homebrew setup
export PATH=/usr/local/opt/python/libexec/bin:$PATH
export PATH=/usr/local/bin:$PATH
# python virtual_env
export VIRTUALENVWRAPPER_PYTHON=/usr/local/opt/python/libexec/bin/python
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
brew update
- (Re)Install CLT.
installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
brew reinstall python
- download python 3.6: https://www.python.org/downloads/
- go through installer, be sure to check "Add Python 3.6 to PATH"
- download python 2.7: https://www.python.org/downloads/
- go through installer, DO NOT check "Add Python PATH"
- Manually add c:/Python27 and c:/Python27/Scripts to windows path
- Windows search, "environment variables"
- click "environment variables"
- user variables, select "Path", click "edit"
- click "new", "browse", etc
- important: once done, go to c:/Python27
- rename "python.exe" to "python2.exe"
- open mingw64 console and try "which python2"
- tbd...
- ``