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的版本
相关推荐
benchmark_cc1 小时前
一次获取多只股票实时行情:QuantDash `quotes.get(symbols=[...])` 批量快照
开发语言·python·数据分析·pandas·量化交易·股票数据·quantdash
geovindu1 小时前
python: PCA
开发语言·后端·python·算法
AI模型调用笔记2 小时前
流式 API 的 usage 为 null?用 cURL 看尾帧,别漏空 choices
python
__万波__2 小时前
嵌入式存储技术--1.Flash物理存储
java·开发语言
Chen_harmony2 小时前
十六、ALV树
开发语言·c++
qq_274475153 小时前
第 28 篇:Promise 全解析:状态、then/catch/finally、静态方法 all/race/allSettled/any
开发语言·javascript
天诰3 小时前
SA-T-06 轨迹数据工程 脏数据检测
人工智能·python·算法·语言模型·ai编程
西西弗Sisyphus3 小时前
C++ 最小 Agentic Loop 实现 - 回调函数系列 - 初识回调(5)
开发语言·c++
程序员小杰@3 小时前
Java 统一报文转换 + 签名验签完整介绍
java·开发语言
Java后端的Ai之路4 小时前
Anthropic 官方文章《Building always-on agents》构建指南
开发语言·网络·python