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的版本
相关推荐
我命由我123457 分钟前
Android 广播 - 组件通信
android·java·开发语言·android studio·android jetpack·android-studio·android runtime
前端 贾公子9 分钟前
LangGraph == 图的状态(State)管理 (中)
开发语言·数据库·python
李福春22 分钟前
斗破Google ADK Java苍穹-第2境斗者-凝旋筑基-Java环境
java·开发语言·gemini·llmagent·深圳同盟·腾讯云架构师技术同盟·adk java
the局外人40 分钟前
FastAPI中jwt的基本使用与实践
后端·python·fastapi
老王爱玩车1 小时前
预处理详解
c语言·开发语言·学习
mklpo1471 小时前
为不支持sse4.2命令集的老旧设备制作Win11 26H2系统镜像,2026-10-11。
运维·windows·python
GoldenSpider.AI1 小时前
用 AI 改流程之前先做「四桶」体检:9 次返工里 8 次靠规则就能消掉(附 Python 发布前校验器)
人工智能·python·自动化·ai智能体
小白快快跑哦1 小时前
python-字符串全解(六):正则表达式-修饰符
python·正则表达式·修饰符
灯澜忆梦1 小时前
【Go Zap 日志库】#1 |快速上手 + 配置详解
开发语言·后端·golang
a努力。1 小时前
四维解析Agent记忆架构:从零实战LangGraph长期记忆
java·开发语言·数据库