LoginSignup
0
0

More than 1 year has passed since last update.

python conda pip「WARNING: Retrying (Retry(total=4, connect) after connection broken by 'ProxyError」エラーの対処法

Posted at

会社で conda env 環境構築時に, 下記のようなエラーに遭遇しました。

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)')))': /simple/numpy/

会社でこれまでは conda install も pip も正常に使用出来ていて, proxy の設定も問題が無いはず. 急にエラーが出るようになった。ハマってあれこれ試行錯誤, なんとか 対処法が分かりました。

結論: pip のバージョンを 20.2.4 以下にする (22.0 などにしない)

これで解決します。
新しく conda の 環境を生成する際にも、pip のバージョンを指定しましょう (指定しないと22.0 など最新のpip がインストールされてしまう)

conda create -n torchRT8b python=3.9 pip=20.2.4

※pip 22 が proxy 環境下で使用出来ないのは, openssl 証明書関連の問題のようですが、その対処方法が分からないため pip 20 を使用。これで問題なくpytorch 1.12 等も使用可能。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0