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的版本
相关推荐
overmind5 分钟前
oeasy Python 114 在列表指定位置插入insert
开发语言·python
github.com/starRTC11 分钟前
Claude Code中英文系列教程34:再谈Skills
开发语言·c#·ai编程
毕设源码-赖学姐15 分钟前
【开题答辩全过程】以 基于Java的外卖点餐网站为例,包含答辩的问题和答案
java·开发语言
喵手18 分钟前
Python爬虫实战:监控型爬虫实战 - 从结构检测到智能告警的完整方案(附CSV导出 + SQLite持久化存储)!
爬虫·python·爬虫实战·零基础python爬虫教学·csv导出·监控型爬虫实战·从结构哦检测到智能告警
深蓝电商API21 分钟前
爬虫中 Cookie 池维护与自动刷新
爬虫·python
蜡笔羊驼34 分钟前
LALIC环境安装过程
开发语言·python·深度学习
Starry_hello world35 分钟前
Python(1)
python
codeJinger39 分钟前
【Python】基础知识
开发语言·python
lsx2024061 小时前
JavaScript Math(算数)详解
开发语言
csbysj20201 小时前
Debian Docker 安装指南
开发语言