MAC install python3 and pip3

Before After the Anaconda delete have to re-download python3and pip3
follow the instructions Justice website to download online package unload trouble
but the official website is relatively easy to download after the next ... it
was first installed use the official website of the package has been forgotten in the end trouble is not trouble
to this back and forth is the third time I installed python3 a record it
emmmm I chose to try to usehome-brew

Install brew

Terminal input:

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

Check after installation

brew doctor  

Output: “Your system is ready to brew”indicates successful installation

提示: 安装 brew 很慢 下载完成可以改一下国内源地址

A more detailed explanation https://zhuanlan.zhihu.com/p/59805070

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

Open brew_install and
Insert picture description here
modify BREW_REPO

# BREW_REPO="https://github.com/Homebrew/brew"
BREW_REPO="git://mirrors.ustc.edu.cn/brew.git"

After modification and saving, execute the following

mkdir -p /usr/local/Homebrew/Library/Taps/homebrew/
cd /usr/local/Homebrew/Library/Taps/homebrew
git clone https://mirrors.ustc.edu.cn/homebrew-core.git

Configuration will see the terminal brew helpdisplay help for the installation is successful

View source

# 查看brew镜像源
git -C "$(brew --repo)" remote -v
# 查看homebrew-core镜像源
git -C "$(brew --repo homebrew/core)" remote -v
# 查看homebrew-cask镜像源(需要安装后才能查看)
git -C "$(brew --repo homebrew/cask)" remote -v 

If it is https://github.com/Homebrew/brew.gitthe source, it needs to be modified

# 修改brew镜像源
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
# 修改homebrew-core镜像源
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
# 修改homebrew-cask镜像源(需要安装后才能修改)
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
# 更新
brew update

Install python3

Find python3

brew search python3

Install python3

brew install python3

Insert picture description here
python3 --version View version

惊喜的发现用 brew 安装 python3 会连 pip3 一起安装
So there is no need to install pip3 separately

Published 41 original articles · Likes2 · Visits 1836

Guess you like

Origin blog.csdn.net/weixin_43883485/article/details/105208546