When you installed Python with homebrew it told you this:
Unversioned symlinks python
, python-config
, pip
etc. pointing to
python3
, python3-config
, pip3
etc., respectively, have been
installed into /usr/local/opt/python/libexec/bin
If you need a reminder, post install, you will get the same message if you run:
brew info python
It says "unversioned links are in /usr/local/opt/python/libexec/bin
". That means, if you want to run Python without specifying the version, i.e. if you want to type this:
python
and this:
pip
to start Python 3 and its corresponding pip
, you need to make sure your PATH
has /usr/local/opt/python/libexec/bin
at the start, i.e.
export PATH=/usr/local/opt/python/libexec/bin:$PATH
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…