Running brew doctor gave me the error recently that python 3 is symlinked to python. And when I type python - it does load python 3.4 interpreter. I'm not sure how it happened. I did recently changed the default installed python with virtualenv to python3 (most projects are python 3) with :
export VIRTUALENV_PYTHON=python3
would this have changed the symlink and what's the best way to change back as
export VIRTUALENV_PYTHON=python
didn't fix it, although I suspect that's because it's already symlinked. (I've used brew to install python 2.7 and python 3 and these were previously fine).
(if changing the virtualenv setting has caused the issue is there another way to make the default python3 without causing the symlink issue?)
You should update brew, then prune any stale links and then re-link Python 2.
brew update
brew upgrade
(optional, but highly recommended) brew prune
brew unlink python && brew link python
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.