brew 一定要换成国内源,求求了。。。
别问我怎么知道的
安装 brew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
安装 iterm2
brew install iterm2
安装 oh-my-zsh
# 安装 oh-my-zsh 之前需要有 zsh # 默认 Mac 已经安装,也可以使用 brew install zsh zsh-completions 再安装一次 brew install wget wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
然后打开 install.sh,编辑修改 REPO、REMOTE 为如下值
REPO=${REPO:-mirrors/oh-my-zsh}
REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}
修改完成后运行
./install.sh
然后
source .zshrc
source 之后会有缺失插件的提示,运行下面两步命令后即可安装插件
git clone https://gitee.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://gitee.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
source .zshrc
完成效果如下
brew install anaconda echo 'export PATH="/usr/local/anaconda3/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
重新打开命令行后输入 conda 出现对应命令提示即可
创建环境首先需要在目录下创建 environment.yaml 和 requirements.txt,environment.yaml 内容如下
name: deeplearn channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - defaults dependencies: - pip==20.0.2
创建环境
conda-env create -f=environment.yaml -n deeplearn python==3.7
使用环境
conda activate deeplearn



