mac bash: python: command not found

问题:今天安装canvas的时候,报错提示python: command not found

/bin/bash下不好使

ln -s /usr/bin/python3 /usr/local/bin/python

zsh下不好使:

解决办法:

# bash

MacBook-Pro ~ % echo "alias python=/usr/bin/python3" >> ~/.zshrc
MacBook-Pro ~ % source ~/.zshrc
MacBook-Pro ~ % echo "alias python=/usr/bin/python3" >> ~/.bash_profile
MacBook-Pro ~ % source ~/.bash_profile

你可能感兴趣的:(macos,bash,开发语言)