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的版本
相关推荐
瑞雪兆丰年兮2 分钟前
JavaWeb-day10-SpringBootWeb案例
java·开发语言·javaweb·web
reasonsummer7 分钟前
【教学类-150-03】20261108蝴蝶连连看html(一页2个版面、3个版面)
python·html
Elastic 中国社区官方博客10 分钟前
更少的位数,相同的召回率:DiskBBQ 更保守的自动校准扫描
大数据·运维·开发语言·人工智能·elasticsearch·搜索引擎
用户0190275816120 分钟前
用 Polars 快速分析 A 股 K 线:比 pandas 更快的列式处理
python
用户03321266636728 分钟前
使用 Python 轻松加密或解密 Excel 文档
python·excel
三雷科技37 分钟前
第6章第4节:自定义分词器
开发语言·c#
Adellle1 小时前
设计模式指南 (Java 版) ㊁
java·开发语言·设计模式
CyrusYiVPP1 小时前
手写 MCP Server:给问答机器人接上本地文件工具,Python 实战第 13 期
人工智能·python
Delightrs2 小时前
Rust LeetCode238 算法题解
开发语言·算法·rust
特立独行的猫A2 小时前
cj-tauri:用仓颉写桌面与鸿蒙 PC 应用
java·后端·python