A Micro Toolbox

ソフトウェアのニッチな問題の対処記録です

Windows 10のAnaconda付属pipでWARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

Windows 10でAnaconda付属のpipを実行したら、SSLモジュールが見つからないとのことでpip installできなかった。

 

> pip install docopt
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting docopt
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/docopt/

...

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

 

下記を読むとOpenSSLのライブラリが必要らしい。

https://conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#ssl-connection-errors

 

自分の場合、PATHに指定しているフォルダには入っていなかった。

 

Anacondaのインストールフォルダ内でlibsslを探したところ、インストールフォルダ\Library\bin\libssl-1_1-x64.dllが見つかった。

 

PATHにインストールフォルダ\Library\bin\を追加してコマンドプロンプトを立ち上げなおしたら無事実行できた。

 

2>pip install docopt
Collecting docopt
Downloading https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz
Building wheels for collected packages: docopt
Building wheel for docopt (setup.py) ... done
Stored in directory: C:\Users\foobar\AppData\Local\pip\Cache\wheels\9b\04\dd\7daf4150b6d9b12949298737de9431a324d4b797ffd63f526e
Successfully built docopt
Installing collected packages: docopt
Successfully installed docopt-0.6.2