技术栈

Mac下更新python

Fisher36522023-12-03 21:43

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的版本
上一篇:HttpRunner自动化测试之响应中文乱码处理
下一篇:Python 内置异常
相关推荐
Warson_L
1 天前
Python `Annotated` 与 LangGraph Reducer 学习笔记
python
韩师傅
1 天前
海天线算法的前世今生
python·计算机视觉
韩师傅
1 天前
当你的甲方设备过烂,要如何快速出效果?
python·计算机视觉
Warson_L
1 天前
LangGraph的MessageState and HumanMessage
python
韩师傅
1 天前
当你的甲方吐槽天空不够蓝,你应该如何应对
python·计算机视觉
Warson_L
1 天前
python的类&继承
python
Warson_L
1 天前
类型标注/type annotation
python
ThreeS
1 天前
手搓MiniVLA全实战教程-一步一步用pytorch解释原理与思路
人工智能·python
金銀銅鐵
1 天前
[Python] 模 n 乘法的逆元计算器
python·数学·游戏
热门推荐
012026年6月AI大模型全景报告:GPT-5.6、Claude Opus 4.8、Gemini 3.5,中美AI三足鼎立谁主沉浮?022026年6月AI行业全景:从百模大战到Agent元年,这30天发生了什么?032026 年 AI 编程工具终极横评:Cursor vs Claude Code vs Copilot vs Windsurf04飞书长连接_事件订阅(接收消息,审批任务状态变更)05Trae国际版与国内版深度测评:AI原生IDE的双生花06【AI】2026 年具身智能模型和世界模型总结07GitHub 镜像站点08Claude Code、Codex、Cursor三分天下:2026年AI编程Agent生态全景剖析092026年AI架构实战:彻底解决OpenAI接口超时与封号,Python调用GPT-5.2/Sora2企业级架构详解(附源码+压测报告)102026 AI 编程工具终极实战指南:Cursor vs Claude Code vs Copilot,开发者该怎么选?