码迷,mamicode.com
首页 > 编程语言 > 详细

python配置环境变量

时间:2019-06-09 23:57:12      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:https   默认   python3   color   source   nal   配置   brew   alt   

使用homebrew安装
brew install python3
 
brew linkapps python3
 
将其设置为默认python,可选
cmd命令打开vi ~/.bash_profile进行修改
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
# PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
PATH="/usr/local/bin:${PATH}"
export PATH
PATH=”/usr/local/Cellar/python/3.6.4_4/bin:${PATH}”
export PATH
alias python="/usr/local/Cellar/python/3.6.4_4/bin/python3.6"
 
cmd命令:
source ~/.bash_profile
添加zsh配置文件:
HenrydeMacBook% vim ~/.zshrc
HenrydeMacBook% cat ~/.zshrc
source ~/.bash_profile
 
不设置为默认直接输入 python3也可
技术图片

 

python配置环境变量

标签:https   默认   python3   color   source   nal   配置   brew   alt   

原文地址:https://www.cnblogs.com/TomBombadil/p/10995280.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!