1 下载python,并且安装 配置环境:
1. 下载网址:https://www.python.org/downloads/
2. 修改Mac默认python版本为3.9.1
mac一般自带python2.7
可以修改 ~/.bash_profile (具体的path取决于你的python3安装路径):
vi ~/.bash_profile
# 添加这一行
alias python="/usr/local/bin/python3"
重启服务:
source ~/.bash_profile
验证:
techtrexcomwwwNew:~ wjw$ python
Python 3.9.2 (v3.9.2:1a79785e3e, Feb 19 2021, 09:09:00)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
3
网友评论