pip download in mainland china
1 | pip install ... |
The command above in p.r.china is awfully slow.
You can use the command below
1 | pip install the - library - you - want - to - install - - trusted - host http: / / mirrors.aliyun.com / pypi / simple / |
or (the tsinghua mirror is not recommended although most well-known)
1 | pip install -i https: //pypi .tuna.tsinghua.edu.cn /simple the-library-you-want-to- install |
or
1 | pip install -i https: //mirrors .zju.edu.cn /pypi/web/simple the-library |
or
1 | pip install -i https: //pypi .mirrors.ustc.edu.cn /simple/ the-library |
It is recommended to install packages via pip commands after activating the conda environment.
You may also find you cannot create a conda environment using
1 | conda create -n drl python=3.6 |
because of connection errors. To fix these errors on Ubuntu, you can create a ~/.condarc and edit it as
1 2 3 4 5 6 7 8 | default_channels: - https: //anaconda .mirrors.sjtug.sjtu.edu.cn /pkgs/r - https: //anaconda .mirrors.sjtug.sjtu.edu.cn /pkgs/main custom_channels: conda-forge: https: //anaconda .mirrors.sjtug.sjtu.edu.cn /cloud/ pytorch: https: //anaconda .mirrors.sjtug.sjtu.edu.cn /cloud/ channels: - defaults |
or
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/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
ssl_verify: true
Ack: https://www.cnblogs.com/dereen/p/anaconda_tencent_mirrors.html
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步