安装homebrew+pip3教程【mac】

搜索了一下,网上大多用homebrew来安装的pip3

homebrew安装【已安装忽略这一段】

我没有安装homebrew,所以先按照官网的办法安装homebrew
cmd输入指令:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

等待一段时间…
报错了:
remote: Enumerating objects: 125197, done.
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed!

【如果成功了可以忽略下面这一点】

参照 https://blog.csdn.net/u013983033/article/details/83118843 (感谢!)
再次试探…

curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install

下载到了本地,然后

vim brew_install

【按i进行修改,下面会出现–INSERT–】
将——

BREW_REPO = "https://github.com/Homebrew/brew".freeze

改为——

BREW_REPO = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git".freeze
CORE_TAP_REPO = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git".freeze

(后面一行是加上的)
【修改完成,esc退出;光标放空白处,输入 :wq 】
成功保存退出了!

ruby ~/brew_installp

等待一段时间。
ok!成功安装!
在这里插入图片描述

pip3安装

sudo python3 get-pip.py

在这里插入图片描述
OK啦!

发布了22 篇原创文章 · 获赞 18 · 访问量 7191

猜你喜欢

转载自blog.csdn.net/weixin_43525427/article/details/98954357