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的版本
相关推荐
smj2302_796826522 分钟前
解决leetcode第3989题网格中保持一致的最大列数
python·算法·leetcode
临床数据科学和人工智能兴趣组11 分钟前
R语言因其强大的统计功能、灵活的编程环境、活跃的社区支持和强大的R扩展包,迅速成为统计学和数据科学领域的首选工具之一
开发语言·数据分析·r语言·r语言-4.2.1
__log1 小时前
弱网环境下的“生命线“:从AI流式响应到大文件上传的稳定性
开发语言·人工智能·php
吴梓穆1 小时前
Python 基础 正则表达式
python
巧克力男孩dd1 小时前
Python超典型练习题(第一次作业)
开发语言·python·算法
TlSfoward1 小时前
TLSFOWARD TLS指纹
开发语言·数据库·爬虫·搜索引擎·https·php
闲猫2 小时前
LangChain / Core components / Models
开发语言·python·langchain
2501_916008893 小时前
苹果上架工具怎么选 不用 Mac 上架 App Store 的几种方案
android·macos·ios·小程序·uni-app·iphone·webview
-银雾鸢尾-3 小时前
C#中的索引器
开发语言·c#
Qlittleboy4 小时前
PHP的接口参数传递的过多,max_input_vars = 5000
开发语言·php