I have a working python version - python3 --version
gave Python 3.9.6
. Then I used homebrew to install python 3.12. It is located in /opt/homebrew/bin
according to the homebrew installer. If I run whereis python
I get usr/bin/python3
and /opt/homebrew/share/man/man1/python3.1
instead. Should I just delete the python binary in /usr/bin/Python
or is there a better way?
In the cloned git repo I will be working with I need to install a virtual environment with venv
. Can there be any conflicts if I use the python version in the homebrew directory and delete the binary in /usr/bin
?
echo $PATH
is /Applications/Sublime Text.app/Contents/SharedSupport/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/david/.cargo/bin
/opt/homebrew/share/man/man1/python3.1
to $PATH and it works. Sorry for asking here./opt/homebrew/share/man/man1
is highly unusual, you shouldn't even have to add this to your path (it only contains manual pages, not binaries). What is the output ofls -l /opt/homebrew/bin/python3{,.12}
?/opt/homebrew/share/man
should be in MANPATH. Sounds like thebrew
installation isn't complete. Yourbrew
installation would have instructed you to addeval "$(/opt/homebrew/bin/brew shellenv)"
to~/.zprofile
. This sets up the correct paths at the beginning of a shell session.