Python3.10的安装和Python interpreter配置(Mac)

大家好,我是阿娟,一个正在坚持每天阅读写作、复盘思考的程序媛 

一、Python的安装

1、访问官网

https://www.python.org/

2、选择系统

Python3.10的安装和Python interpreter配置(Mac)_第1张图片

3、选择一个稳定版本下载

Python3.10的安装和Python interpreter配置(Mac)_第2张图片

4、一直下一步输入密码即完成安装

Python3.10的安装和Python interpreter配置(Mac)_第3张图片

5、环境变量配置

   open .bash_profile

   输入Python安装的路径环境变量

PATH="/Library/Frameworks/Python.framework/Versions/3.10/bin:${PATH}"
export PATH

alias python="/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10"

注意:3.10是安装的Python的版本号,根据自己安装的版本进行替换

保存并退出

最后source .bash_profile ,让这个配置文件在修改后立即生效

重新进入终端Terminal,使用python3 --version命令,查看当前Python版本

二、Python interpreter配置

1、which python 获取安装路径

2、进入设置界面

Python3.10的安装和Python interpreter配置(Mac)_第4张图片

Python3.10的安装和Python interpreter配置(Mac)_第5张图片

3、选择添加

Python3.10的安装和Python interpreter配置(Mac)_第6张图片

Python3.10的安装和Python interpreter配置(Mac)_第7张图片

Python3.10的安装和Python interpreter配置(Mac)_第8张图片

       输入第一步获取的路径

Python3.10的安装和Python interpreter配置(Mac)_第9张图片

    点击ok保存

  

你可能感兴趣的:(python,python,开发语言,测试工具)