1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

pip installでProxyError

Posted at

プロキシ環境下のLinux(WSL2 Ubuntu)で pip install したら ProxyError でうまく行かなかった話です。

エラー内容

例えばこのような内容です。

$ pip3 install pylint
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3e787ff340>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))': /simple/pylint/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3e787ff0d0>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))': /simple/pylint/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3e78806460>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))': /simple/pylint/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3e788065e0>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))': /simple/pylint/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3e78806550>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))': /simple/pylint/
ERROR: Could not find a version that satisfies the requirement pylint (from versions: none)

原因

環境変数を https_proxy=https://<略> にしているのが悪かったようです。

https_proxy=http://<略> にしたらうまく行きました。

あとがき

https_proxy という名前からして https:// で書くのだと思っていましたが、違うのですね。

なぜダメなのかは、すみません、知識がなく分かりません…… お分かりの方がいればコメントいただけると幸いです。

1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?