#Python 命令

  • 系统默认使用python2,使用brew可安装python3
  • python --version:查看python2版本
  • which python:查看python安装路径
  • 设置路径$path:
    • echo $PATH
    • vi /etc/paths
  • vi ~/.bash_profile
    • If you wish to have this formula's python executable in your PATH then add the following to ~/.bash_profile: export PATH="/usr/local/opt/python/libexec/bin:$PATH"
    • 保存,source ~/.bash_profile
    • new 一个终端窗口才能看到调整后的结果

Recent Posts