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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --set show_channel_urls yes
conda config --remove-key channels
gedit ~/.condarc
source ~/.condarc
conda create--name python34 python=3.4
activate python34# for Windows source activate python34# for Linux & Mac
python --version
deactivate python34 # for Windows source deactivate python34 # for Linux & Mac
conda create -n pyhon34 --clone python34clone
conda remove --name python34 --all
conda info -e
conda list
conda list -n python34
conda search numpy
conda install -n python34 numpy
conda list
conda list -n python34
conda search numpy
conda install -n python34 numpy
conda update -n python34 numpy
conda remove -n python34 numpy 前面已经提到,conda将conda、python等都视为package,因此,完全可以使用conda来管理conda和python的版本,例如
conda update conda
conda update anaconda
conda update python
gedit ~/.bashrc
立即生效
source ~/.bashrc
pip 后加参数 -i https://pypi.tuna.tsinghua.edu.cn/simple
例:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas
修改 ~/.pip/pip.conf (没有就创建一个), 修改 index-url至tuna,内容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
直接在user目录中创建一个pip目录,如:C:\Users\xxxx\pip,新建文件pip.ini,内容如下
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple