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的版本
相关推荐
沐知全栈开发19 分钟前
HTML5 浏览器支持
开发语言
wasp52019 分钟前
AgentScope Java 核心架构深度解析
java·开发语言·人工智能·架构·agentscope
WHOVENLY22 分钟前
【javaScript】- 笔试题合集(长期更新,建议收藏,目前已更新至31题)
开发语言·前端·javascript
free-elcmacom32 分钟前
深度学习<4>高效模型架构与优化器的“效率革命”
人工智能·python·深度学习·机器学习·架构
慌糖38 分钟前
流-为序列化解释
开发语言
liliangcsdn1 小时前
python模拟beam search优化LLM输出过程
人工智能·python
LXS_3571 小时前
Day 18 C++提高 之 STL常用容器(string、vector、deque)
开发语言·c++·笔记·学习方法·改行学it
王琦03182 小时前
Python 函数详解
开发语言·python
胡伯来了2 小时前
13. Python打包工具- setuptools
开发语言·python
小鸡吃米…2 小时前
Python 中的多层继承
开发语言·python