Mac Os Python3安装与配置

1. 安装 

  • 使用brew 命令安装,未安装Home brew,详见官网安装方法 https://brew.sh/
  brew install  python3
  • 安装好后配置环境变量
  export PATH=/Library/Frameworks/Python.framework/Versions/3.9/bin:$PATH
  • 测试安装是否成功
   python3  --version
   Python 3.9.5

2. pip源更换  

  国内较快的源

  • 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
  • 阿里云 https://mirrors.aliyun.com/pypi/simple/
  • 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ps

       更换命令: pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/




 

 

posted @ 2023-04-19 13:56  ForcePush  阅读(99)  评论(0编辑  收藏  举报