Mac下更新python

1. 查看python版本

shell 复制代码
python3 -V

2. 更新python版本

shell 复制代码
brew upgrade python

3. 查看python3的路径:

shell 复制代码
which python3

4. 修改.bash_profile文件

shell 复制代码
vim ~/.bash_profile
  • 插入python默认执行文件
shell 复制代码
alias python="/usr/local/bin/python3"

5. 应用环境变量

shell 复制代码
source ~/.bash_profile
  • 使用种方式更新python的同时会更新pip的版本
相关推荐
疯狂打码的少年12 分钟前
【Day 6 Java转Python】字符串处理的“降维打击”
java·开发语言·python
2301_7644413320 分钟前
家国同构模型:计算社会学的创新探索
python·数学建模
hogenlaw42 分钟前
Stream流
android·java·开发语言
ShCDNay1 小时前
Python核心底层知识(个人记录)
开发语言·python
xyq20241 小时前
组合实体模式
开发语言
来自远方的老作者1 小时前
第7章 运算符-7.2 赋值运算符
开发语言·数据结构·python·赋值运算符
A.A呐1 小时前
【C++第二十四章】异常
开发语言·c++
常利兵1 小时前
解锁Kotlin:数据类与密封类的奇妙之旅
android·开发语言·kotlin
来自远方的老作者1 小时前
第7章 运算符-7.1 算术运算符
开发语言·数据结构·python·算法·算术运算符
tq6J5Yg141 小时前
windows10本地部署openclaw
前端·python