pythonの国内ミラーの変更

703 ワード

一、windowsはユーザーホームディレクトリの下でpipディレクトリを作成し、pipディレクトリに入り、pipを作成する.iniファイル、ファイルの内容は以下の通りです.
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
timeout = 150

二、Liunxはユーザーホームディレクトリの下で作成する.pipディレクトリ、に入ります.pipディレクトリ、pipを作成する.confファイル、ファイルの内容は以下の通りです.
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
timeout = 150

拡張:pipインストールパッケージミラーソースを指定する
##  pip
python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/
##     django 
python -m pip install django -i https://pypi.tuna.tsinghua.edu.cn/simple/