先安装python,才能使用pip安装python的软件
后面就很简单了
conda安装【不过需要VC++环境自己注意下吧】
当然也可以miniconda
mamba也差不多
左边是conda,右边是mamba,几乎完全一样,所以用过conda,mamba几乎不用学习就可使用。
创建Python环境也是一样的
mamba create --name python3.5 python=3.5 #完美替代conda
激活推出如下:
conda activate python3.5 #激活python3.5环境
conda deactivate #退出python3.5环境
其实快不快主要看你的配置:多引用国内的源就可以了:
清华大学开源软件镜像站
https://mirrors.sjtug.sjtu.edu.cn/
channels:
- defaults
show_channel_urls: true
channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
上海交通大学开源软件镜像站
https://mirrors.sjtug.sjtu.edu.cn/
channels:
- defaults
show_channel_urls: true
channel_alias: https://anaconda.mirrors.sjtug.sjtu.edu.cn/
default_channels:
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/mro
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/r
custom_channels:
conda-forge: https://anaconda.mirrors.sjtug.sjtu.edu.cn/conda-forge
soumith: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/soumith
bioconda: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/bioconda
menpo: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/menpo
viscid-hub: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/viscid-hub
atztogo: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/atztogo
北京外国语大学开源软件镜像站
https://mirrors.bfsu.edu.cn/
channels:
- defaults
show_channel_urls: true
channel_alias: https://mirrors.bfsu.edu.cn/anaconda
default_channels:
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/free
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/r
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/pro
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.bfsu.edu.cn/anaconda/cloud
msys2: https://mirrors.bfsu.edu.cn/anaconda/cloud
bioconda: https://mirrors.bfsu.edu.cn/anaconda/cloud
menpo: https://mirrors.bfsu.edu.cn/anaconda/cloud
pytorch: https://mirrors.bfsu.edu.cn/anaconda/cloud
simpleitk: https://mirrors.bfsu.edu.cn/anaconda/cloud
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/r
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.bfsu.edu.cn/anaconda/cloud
msys2: https://mirrors.bfsu.edu.cn/anaconda/cloud
bioconda: https://mirrors.bfsu.edu.cn/anaconda/cloud
menpo: https://mirrors.bfsu.edu.cn/anaconda/cloud
pytorch: https://mirrors.bfsu.edu.cn/anaconda/cloud
simpleitk: https://mirrors.bfsu.edu.cn/anaconda/cloud
配置内容:
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/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
show_channel_urls: true
# 2020.12.20 巨快源
channels:
- https://mirrors.sjtug.sjtu.edu.cn/anaconda/pkgs/main/
- https://mirrors.sjtug.sjtu.edu.cn/anaconda/pkgs/free/
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/r
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/pro
- https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2
show_channel_urls: true
ssl_verify: false
# Linux 2022.4.10 创建py2的虚拟环境
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
- defaults
show_channel_urls: true
2. pip换源
pip国内的一些镜像:
阿里云 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 install -i https://pypi.douban.com/simple torch==1.5.0
感兴趣就都尝试一下,两鸟在林,不如一鸟在手。
可以参考:pip/conda/mamba安装拓展 - 简书
Mamba-Configuration