Mac下配置python开发基础环境(brew)

安装home-brew https://brew.sh/index_zh-cn 

https://blog.csdn.net/fxp850899969/article/details/53284193

 

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

 

替换home-brew

# 替换brew.git:

$ cd "$(brew --repo)"

# 中国科大:

$ git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

# 清华大学:

$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

 

# 替换homebrew-core.git:

$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

# 中国科大:

$ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

# 清华大学:

$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

 

# 替换homebrew-bottles:

# 中国科大:

$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile

$ source ~/.bash_profile

# 清华大学:

$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile

$ source ~/.bash_profile

 

# 应用生效:

$ brew update

 

安装python3     https://www.cnblogs.com/meng1314-shuai/p/9031686.html

brew search python3 搜索

brew install python3

 

安装pip3 

curl https://bootstrap.pypa.io/get-pip.py | python3 

pip --version

 

安装virtualenv

sudo pip install virtualenv

sudo pip install virtualenvwrapper

 

vi ~/.bash_profile

 

将一下内容放入文件最后

export WORKON_HOME=$HOME/.virtualenvs

source /usr/local/bin/virtualenvwrapper.sh

 

运行

source ~/.bash_profile

 

Git

brew install git

 

永久记住密码

git config --global user.name "wenbo"

git config --global user.email "[email protected]"

 

Mysql

brew install mysql

 

Redis

brew install redis

 

下载macPycharm

前往下载地址:https://www.jetbrains.com/pycharm/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章