pipにtrusted hostを追加します。

1675 ワード

原文のリンク:http://www.cnblogs.com/lfoder/p/5878074.html
前回の「Python virtualnvインストールライブラリのエラーSSL:CERTIFFATE_VERFY_FAILE Dに発生した問題については、徹底的に処理します。
 
pipが7.0にアップグレードされた後、httpミラーを使ってパッケージのインストールとアップグレードを行う時、次のようなヒントがあります。
Collecting beautifulsoup4
The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with ‘–trusted-host mirrors.aliyun.com’.
Could not find a version that satisfies the requirement beautifulsoup4 (from versions: )
No matching distribution found for beautifulsoup4
解決方法は以下の通りです。
インストール時に加入する
–-trusted-host mirrors.aliyun.com
パラメータ
pip install beautifulsoup4 --trusted-host mirrors.aliyun.com
pip.co nfにtrusted-hostオプションを追加します。この方法は一苦労永逸です。
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
 
転載先:https://www.cnblogs.com/lfoder/p/5878074.html