1. 安装&卸载
1.1 ubuntu环境下的安装
各版本的下载链接
bash 安装文件.sh
... 一路yes
conda --version
vim ~/.bashrc
export PATH=/xx.../anaconda3/bin:$PATH
source ~/.bashrc
vim ~/.condarc
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- defaults
show_channel_urls: true
source ~/.condarc
vim ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn
source ~/.pip/pip.conf
1.2 ubuntu环境下的卸载
rm -rf anaconda文件夹名
sudo gedit ~/.bashrc
删除 export PATH=/xx.../anaconda3/bin:$PATH
source ~/.bashrc
2. 操作命令
conda create -n {name} python={version}
conda remove -n {name} --all
conda activate {name}
conda deactivate
conda info --envs
conda env export > {name}.yaml
pip freeze > {name}.txt
conda env create -f {name}.yaml
pip install -r {name}.txt
conda install 包名
conda remove 包名
conda update 包名
conda list
3. 其他
|