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的版本
相关推荐
m0_6028577621 小时前
如何提升SQL存储过程逻辑复用_封装通用存储过程函数
jvm·数据库·python
傻啦嘿哟1 天前
如何在 Python 中使用 colorama 库来给输出添加颜色
开发语言·python
forEverPlume1 天前
mysql如何实现高可用集群架构_基于MHA环境搭建与部署
jvm·数据库·python
geovindu1 天前
go: Visitor Pattern
开发语言·设计模式·golang·访问者模式
宣宣猪的小花园.1 天前
C语言重难点全解析:内存管理到位运算
c语言·开发语言·单片机
方安乐1 天前
python之向量、向量和、向量点积
开发语言·python·numpy
zh1570231 天前
JavaScript中WorkerThreads解决服务端计算瓶颈
jvm·数据库·python
小小小米粒1 天前
Collection单列集合、Map(Key - Value)双列集合,多继承实现。
java·开发语言·windows
蜡台1 天前
Python包管理工具pip完全指南-----2
linux·windows·python
Mr.朱鹏1 天前
【Python 进阶 | 第四篇】Psycopg3 + Flask 实现 PostgreSQL CRUD 全流程:从连接池到RESTful接口
python·postgresql·flask·virtualenv·fastapi·pip·tornado