<p>此问题已回答<a href="https://stackoverflow.com/questions/54135206/requests-caused-by-sslerrorcant-connect-to-https-url-because-the-ssl-module">here</a>,但适用于Windows用户。我在Anaconda环境下的第三方应用程序上的Linux计算机上遇到此错误。我向我的<code>PATH</code>env添加了以下路径:</p>
<pre><code><path>/anaconda2/lib
<path>/anaconda2/bin
</code></pre>
<p>但当我跑步时:</p>
<pre><code>import requests
requests.get("https://api.ipify.org")
</code></pre>
<p>我得到一个错误:</p>
<pre><code>requests.exceptions.SSLError: HTTPSConnectionPool(host='api.ipify.org',
port=443): Max retries exceeded with url: / (Caused by SSLError("Can't
connect to HTTPS URL because the SSL module is not available."))
</code></pre>
<p>第三方应用程序和condashell都在<code>PATH</code>env中包含这些路径,但它只在shell上工作</p>