1

This is what I see in terminal:

My-MacBook-Pro:~ username$ which python3
/usr/bin/python3
My-MacBook-Pro:~ username$ python3
-bash: /usr/local/bin/python3: No such file or directory

There is no python3 binary at /usr/local/bin/.

There is a file called python3 at /usr/bin/ however.

3 Answers 3

1

You may need to put it in the front of your path. If you are using bash, do this:

echo 'export PATH="/usr/local/opt/python/libexec/bin:$PATH"' >> ~/.bash_profile

Then either source ~/.bash_profile or open a new terminal. Then try which python and it should show you the version in this directory. Or type in python --version and it will report "Python 3.7.7".

Sign up to request clarification or add additional context in comments.

Comments

0

Which version did you install?

Run brew info [python-package] and you should see something like this (for example I installed [email protected], so I ran brew info [email protected])

If you need to have [email protected] first in your PATH run:
  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

Just run the line and restart terminal, it should be working.

1 Comment

You have the right idea. I simply closed terminal and opened it again so that the terminal could read the Path variable again after the install.
0

I closed terminal and then reopened it and it fixed the problem. Now typing python3 opens the python interpreter.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.