Python win環境pipサードパーティ製ライブラリのインストール時にエラーが発生しました:pip is configured with locations that require TLS/SSL,however the ssl mo

11733 ワード

pipサードパーティ製ライブラリパッケージthriftpy 2をインストールするときにエラーが発生します.
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting thriftpy2
  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/thriftpy2/
  Retrying (Retry(total=3, 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/thriftpy2/
  Retrying (Retry(total=2, 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/thriftpy2/
  Retrying (Retry(total=1, 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/thriftpy2/
  Retrying (Retry(total=0, 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/thriftpy2/
  Could not fetch URL https://pypi.org/simple/thriftpy2/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/thriftpy2/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
  Could not find a version that satisfies the requirement thriftpy2 (from versions: )
No matching distribution found for thriftpy2

いろいろ調べて、最後に文章を参考にします.https://blog.csdn.net/marueibo/article/details/86678936Opensslが不足しているか、バージョンが低すぎることがわかりました.
文章で提案した方法に従って、住所に入ります.https://slproweb.com/products/Win32OpenSSL.htmlをクリックしてインストールパッケージをダウンロードします.
ダウンロードが完了したら、直接クリックして実行し、サービス条項に同意した後、デフォルトのオプションは次のステップで完了します.
再実行pip:成功!

D:\software\jqdatasdk-master>pip --trusted-host pypi.python.org install thriftpy2
Collecting thriftpy2
  Downloading https://files.pythonhosted.org/packages/78/9b/f415dc3b1a17d52a0dbfe311f1c3250469ad219a0bdb506eb8050245c8d4/thriftpy2-0.4.10.tar.gz (301kB)
    100% |████████████████████████████████| 307kB 468kB/s
Requirement already satisfied: ply<4.0,>=3.4 in d:\software\anaconda3\lib\site-packages (from thriftpy2) (3.11)
Building wheels for collected packages: thriftpy2
  Running setup.py bdist_wheel for thriftpy2 ... done
  Stored in directory: C:\Users\asyou\AppData\Local\pip\Cache\wheels\4c\ce\d1\710c5210049505afcce50112db350a76cd481a1575e832d79a
Successfully built thriftpy2
Installing collected packages: thriftpy2
Successfully installed thriftpy2-0.4.10