当前位置:   article > 正文

mac bash: python: command not found

mac bash: python: command not found

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

/bin/bash下不好使

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

zsh下不好使:

解决办法:

  1. # bash
  2. MacBook-Pro ~ % echo "alias python=/usr/bin/python3" >> ~/.zshrc
  3. MacBook-Pro ~ % source ~/.zshrc
  4. MacBook-Pro ~ % echo "alias python=/usr/bin/python3" >> ~/.bash_profile
  5. MacBook-Pro ~ % source ~/.bash_profile

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/585263
推荐阅读
相关标签
  

闽ICP备14008679号