1 找到所安装python路径/usr/local/Cellar/python/2.7.13/bin
2 vim ~/.bash_profile
3 添加如下代码:
PATH="/usr/local/Cellar/python/2.7.13/bin:${PATH}"
export PATH
4 保存退出 ,
5 source ~/.bash_profile
转载于:https://www.cnblogs.com/xqnq2007/p/6606659.html
本文详细介绍如何在MacOS环境下,通过修改.bash_profile文件来配置Python的环境变量,确保系统能够正确识别已安装的Python版本。步骤包括定位Python安装路径、编辑配置文件、添加环境变量并使之生效。
1 找到所安装python路径/usr/local/Cellar/python/2.7.13/bin
2 vim ~/.bash_profile
3 添加如下代码:
PATH="/usr/local/Cellar/python/2.7.13/bin:${PATH}"
export PATH
4 保存退出 ,
5 source ~/.bash_profile
转载于:https://www.cnblogs.com/xqnq2007/p/6606659.html
2335

被折叠的 条评论
为什么被折叠?