赞
踩
下载pip
curl ‘https://bootstrap.pypa.io/pip/2.7/get-pip.py’ > get-pip.py
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
打开配置文件
open ~/.bash_profile
export PATH=${PATH}:/Library/Frameworks/Python.framework/Versions/3.9/bin
alias python="/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
alias pip="/Library/Frameworks/Python.framework/Versions/3.9/bin/pip3"
python3路径
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3
pip3路径
/Library/Frameworks/Python.framework/Versions/3.9/bin/pip3
设置完成后,即可使用python和pip命令
python安装homebrew
国际源:
/bin/bash -c “
(
c
u
r
l
−
f
s
S
L
h
t
p
s
:
/
/
r
a
w
.
g
i
t
h
u
b
u
s
e
r
c
o
n
t
e
n
t
.
c
o
m
/
H
o
m
e
b
r
e
w
/
i
n
s
t
a
l
l
/
H
E
A
D
/
i
n
s
t
a
l
l
.
s
h
)
"
国
内
源
:
/
b
i
n
/
z
s
h
−
c
"
(curl -fsSL htps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 国内源: /bin/zsh -c "
(curl−fsSLhtps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"国内源:/bin/zsh−c"(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)”
安装好homebrew后,接下来安装miniconda,这个工具可以管理python环境,避免后期安装其他文件后破坏整个环境。 运行:brew install miniconda 这里应注意,安装完后不要马上用conda命令安装其他软件,而是先运行以下命令:
conda init “ ( b a s e n a m e " (basename " (basename"{SHELL}”)"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。