Python pip はミラーソースを Douban ソースに変更します.
pip パッケージが遅すぎたり、インストールできない (リクエストのタイムアウト) ことがよくあります. このとき, pip ソースの変更を検討する必要があります.
1. 一時的な方法
ピップ
-i https://pypi.doubanio.com/simple
-i https://pypi.douban.com/simple
pip install -r requirements.txt or "package name"-i https://pypi.douban.com/simple
pip install -r requirements.txt or "package name"-i https://pypi.doubanio.com/simple
pip install -r requirements.txt -i https://pypi.doubanio.com/simple
pip install pygame -i https://pypi.doubanio.com/simple
pip install -r requirements.txt -i https://pypi.douban.com/simple
pip install pygame -i https://pypi.douban.com/simple
その他の情報源:
Alibaba Cloud https://mirrors.aliyun.com/pypi/simple/
中国科学技術大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆板 http://pypi.douban.com/ simple /
清華大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技術大学 http://pypi.mirrors.ustc.edu.cn/simple/
これらの 2 つの例のメソッドは、一般的に
コンダ
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
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/pytorch/
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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.sjtug.sjtu.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.sjtug.sjtu.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.sjtug.sjtu.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
conda config --remove-key channels
2.恒久的な方法
ここでは恒久的な方法はお勧めしません。詳細な説明はありません。
ローカル インストール
方法 1: .whl パッケージ
pip install **.whl (写全该文件的路径)
方法 2: .tar.bz2
- ダウンロードしたパッケージを ...\Anaconda3\pkgs ディレクトリに移動し、
- このディレクトリで CMD を開き、次のように実行します。
conda install --use-local **.tar.bz2