conda
安装
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
source /root/.bashrc
配置 aconda 仓库镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
配置相关环境
conda install -y tensorflow opencv jupyter
相关命令
conda update -n base conda
conda create -n xxxx python=3.5
conda activate xxxx
conda deactivate
conda env list
conda info --envs
conda list
conda list -n xxx
conda update xxx
conda uninstall xxx
conda clean -p //删除没有用的包
conda clean -t //删除tar包
conda clean -y --all //删除所有的安装包及cache
conda remove --name oldname --all
python克隆环境
conda create --name newname --clone oldname
conda install --channel https://conda.anaconda.org/anaconda tensorflow=1.8.0
配置讯数据源
pip config list
pip config list --[user|global]
pip config get global.index-url
pip config set key value
pip config set global.index-url https://mirrors.ustc.edu.cn/pypi/web/simple
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
pip config set global.trusted-host https://mirrors.ustc.edu.cn/pypi/web/simple
pip config unset key
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
pip search flask
pip install pip -U
国内镜像源
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
pip list
pip purge
pip remove
pip help
pip install xxx
pip uninstall xxx
pip show xxx
pip check xxx
linux下载pytorch
conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=10.2 -c pytorch