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的版本
相关推荐
江畔柳前堤21 小时前
roLabelImg 详细安装教程
开发语言·人工智能·后端·云原生
05664621 小时前
agent学习Day15——SQLAlchemy 查询过滤、分页与历史列表接口
python·学习·fastapi
Wang's Blog1 天前
Go-Zero 项目开发47:自研微服务框架的必要性与核心结构设计
开发语言·微服务·golang
白鸽(二般)1 天前
MinIO Java Client API
java·开发语言
hPw0eKIqD1 天前
C++ 模板参数推导问题小记(非推导上下文)
开发语言·c++
程序员爱德华1 天前
Python与C++:异同点对比
c++·python
hangyuekejiGEO1 天前
GEO技术服务选型指南
大数据·人工智能·python
临床数据科学和人工智能兴趣组1 天前
要使用 R Markdown,首先需要安装 R 和 RStudio,接着安装 rmarkdown 包
开发语言·数据挖掘·数据分析·r语言·r语言-4.2.1
软萌萌的11 天前
Java Spring Boot 修改yml配置&加载顺序规则
java·spring boot·python
Nebula嵌入式1 天前
【C语言】09-深入解析main函数
linux·c语言·开发语言·嵌入式