5

Mac版-python环境配置:Python默认版本更新

 2 years ago
source link: http://www.mrliangqi.com/1616.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Mac版-python环境配置:Python默认版本更新

-Linux- 2022-03-21 0 75

1.查看python版本: (mac自带python 2.7.10,版本相对较低。现在python已升级到python3)
#python

2.输入命令安装下开发工具:

#xcode-select –install

3.进去官网地址:https://brew.sh/

4.安装brew(brew类似linux yum 安装包)
# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
如果报错: curl: (35) LibreSSL SSL_connect: Connection reset by peer in connection to raw.githubusercontent.com:443

5.使用国内源即可:
#/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
重启终端 或者 运行 source /Users/hazz/.zprofile 否则可能无法使用
查看安装成功,打印版本表示安装成功
#brew -v

6.安装python3,打开命令后输入:
#brew install python3

7.验证下安装成功:
#python3

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK