I installed python3.7 using:
brew install python@3.7
Then I did:
echo 'export PATH="/usr/local/opt/python@3.7/bin:$PATH"' >> /Users/sony/.bash_profile
export LDFLAGS="-L/usr/local/opt/python@3.7/lib"
When I do:
/usr/local/opt/python@3.7/bin/python3
I get:
Python 3.7.10 (default, Apr 27 2021, 08:48:55)
Which means it works but when I do:
python3.7
I get:
-bash: python3.7: command not found
Not sure what I missed here?
There are a few things that you could try:
users>your_user
then click on Cmd+shift+.
this way you will be able to access the hidden files, then proceed to open the .bash_profile
and make sure the export path is properly entered/or enter it and save. (remember to refresh the terminal before running the python command) .zshrc
file and shift to the zsh terminal by entering chsh -s /bin/zsh
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.