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的版本
相关推荐
李昊哲小课6 分钟前
fastapi sse websocket 智能家居实时控制台
python·websocket·智能家居·fastapi·sse
杰佛史彦明 本王是暴君17 分钟前
PyTorch KernelAgent 源码解读 ---(2)--- 总体流程
人工智能·pytorch·python
步行cgn23 分钟前
carList.forEach(System.out::println)
java·开发语言·mybatis
Zane199435 分钟前
别再手写 try/finally 了:一文讲透 with 语句背后的上下文管理器协议
后端·python
进击的程序猿~39 分钟前
Go 内存分配与垃圾回收源码深度学习手册
开发语言·后端·golang
李可以量化42 分钟前
量化高性能服务框架 Tornado 全面解析(上):异步非阻塞的核心能力与场景落地
大数据·python·量化交易·tornado·qmt·ptrade
geovindu1 小时前
go:Bit Operation Algorithm
开发语言·后端·算法·golang·位运算法
内蒙深海大鲨鱼1 小时前
3.Introduction to PyTorch YouTube Series--Autograd
人工智能·pytorch·python
用户0332126663671 小时前
使用 Python 在 Excel 中添加或删除批注
python·excel
dogstarhuang1 小时前
手把手用 Doubao-Seed-Evolving 写一个网站监控脚本:完整代码与两处踩坑
python·ai编程·掘金技术征文