Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can’t install any package via pip on windows 10, ssl module in Python is not available #1139
Can’t install any package via pip on windows 10, ssl module in Python is not available #1139
Comments
python version: 3.6 (Intel Distribution for Python for Windows 2018 update 1)
virtualenv version: 15.1.0
windows version: windows 10 pro, build 17101.rs4_release.180211-1040
I executed only 2 commands, here is what Powershell output:
PS E:\Python\Virtualenv\Scripts> .\activate (Virtualenv) PS E:\Python\Virtualenv\Scripts> pip install numpy pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting numpy Could not fetch URL https://pypi.python.org/simple/numpy/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping Could not find a version that satisfies the requirement numpy (from versions: ) No matching distribution found for numpy
This directory Python is not where the python installed, it is only a normal directory.
I have tried installing some standalone openssl, like the one from here, but neither of them worked.
The text was updated successfully, but these errors were encountered:
@tobiasherp
System pip is ok, but the pip in the virtualenv does no good.
I don’t know where the issue is, I can’t even find a similar situation on Google. 🙁
Not only the numpy , it can’t install any package online. But if there is a wheel file, it can be installed successfully, thus I think the problem might be related to the SSL.
Right, PyPI uses https now, so you need ssl support. If your system Python doesn’t have it, your virtualenv won’t have it either. With Python 3, you should be able to import an ssl module:
Your best bet might be to switch to an interpreter which has the ssl module.
The 3.6.4 interpreter I just now downloaded from https://www.python.org/ seems to have ssl support.
AFAICS, this is not a virtualenv issue; proposing to close it.
It might not be a venv problem but it is still a problem. In my instance I cannot install in venv or system pip
I have IntelPython3 installed on Win 10 64 bit and YES it has openssl installed and compiled but for some reason things does not work
I have seen this: [(https://software.intel.com/en-us/forums/intel-distribution-for-python/topic/737878#comment-1920719)]
But I could not fix my version of this problem.
Any advice on this issue would be very helpfull
@theCJMan are you still experiencing this problem?
On Tue, 17 Apr 2018, 19:44 Sumana Harihareswara, ***@***.***> wrote: @theCJMan are you still experiencing this problem? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .
Transport Layer Security, or TLS, is part of how we make sure connections between your computer and PyPI are private and secure. It’s a cryptographic protocol that’s had several versions over time.
You need to be connecting to PyPI with a TLS support library, such as a recent version of OpenSSL. The specific steps you need to take will depend on your operating system version, where your installation of Python originated (python.org, your OS vendor, or an intermediate distributor), and the installed versions of Python, setuptools , pipenv , and pip . For help, please go to the #pypa IRC channel on Freenode, file an issue at pypa/packaging-problems/issues, or post to the python-help mailing list, including your OS and installation details and the output of pip install -vvv upgrade pip.
I also experienced this on macos, python 2.7.15 — system python worked fine, virtual env failed to install due to
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
my system python imported ssl fine, but the venv python gave the following error:
raceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 126, in from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN, HAS_ALPN, HAS_TLSv1_3 ImportError: cannot import name HAS_TLSv1_3
after deleting the env directory, and recreating the env, it all worked fine.
I got same issue as @liurui39660 , also using Intel Python Distribution and python -m venv to create my venv. It seems to be an issue with ssl module, having nothing to do with pip :
(venv) C:\Users\ceefour\git\tews\ecn-svc>python Python 3.6.3 |Anaconda custom (64-bit)| (default, May 3 2018, 23:39:44) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. Intel(R) Distribution for Python is brought to you by Intel Corporation. Please check out: https://software.intel.com/en-us/python-distribution >>> import ssl Traceback (most recent call last): File "", line 1, in File "C:\ProgramData\Anaconda3\lib\ssl.py", line 101, in import _ssl # if we can't import it, let the error propagate ImportError: DLL load failed: The operating system cannot run %1. >>>
Note that the bug only triggered when using Intel Python inside a venv. When using the base env, it works:
(base) C:\Users\ceefour>python Python 3.6.3 |Anaconda custom (64-bit)| (default, May 3 2018, 23:39:44) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. Intel(R) Distribution for Python is brought to you by Intel Corporation. Please check out: https://software.intel.com/en-us/python-distribution >>> import ssl >>>
Update: This thread seems to be a clue:
Rohit J. (Intel) Thu, 07/06/2017 — 21:40
pip was unusable with both IDP and Miniconda on Windows. The problem was root-caused to a conflicting library (libeay32.dll) that was installed in system path. At run-time, loading of this library gained precedence over what we ship with our distribution. There was a version conflict and the execution would fail with «ImportError: DLL load failed: The operating system cannot run %1.». Removing this extraneous library from system path resolved the issue.
I have lots of libeay32.dll inside of C:\Program Files , including one in C:\ProgramData\Anaconda3\Library\bin
I have tried moving C:\ProgramData\Anaconda3\Library\bin to front of PATH , but still error happens.
I had the same issue. I was configuring a new computer with python and jupyter with anaconda, and the problem occured when I tried to install a package use pip.
Based on the discussions above, that this is an environment issue, I tried running «pip install» command in Anaconda Prompt instead of cmd. And the pip command was executed. 😁
I am still struggling with following since yesterday, after installing Python 3.7.1 with Anaconda3
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
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/pip/
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/pip/
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/pip/
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/pip/
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/pip/
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
Requirement already up-to-date: pip in d:\anaconda3\lib\site-packages (18.1)
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
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
I had the same problem. Using willliu1995 suggestion solved the problem. Running pip from cmd prompt did nor work but launching jupyter notebook and running !pip install worked.
If pip install pandas is not working on CMD prompt, run this using Anaconda prompt — it works. You can find Anaconda prompt using this:
Go with the mouse to the Windows Icon (lower left) and start typing «Anaconda». There should show up some matching entries. Select «Anaconda Prompt». A new command window, named «Anaconda Prompt» will open. Source — https://stackoverflow.com/questions/47914980/how-to-access-anaconda-command-prompt-in-windows-10-64-bit
If you prefer to use the Windows Command Prompt instead, you will need to add the following directories to your Windows Environment path:
%Miniconda3_DIR%;%Miniconda3_DIR%\Library\mingw-w64\bin;%Miniconda3_DIR%\Library\usr\bin;%Miniconda3_DIR%\Library\bin;%Miniconda3_DIR%\Scripts;%Miniconda3_DIR%\bin;
[where, %Miniconda3_DIR% should be substituted by your Miniconda (or Anaconda) install path]
For example, I have my Miniconda installed at E:\Portable\Miniconda3 . So my Windows PATH had to include these folders:
E:\Portable\Miniconda3;E:\Portable\Miniconda3\Library\mingw-w64\bin;E:\Portable\Miniconda3\Library\usr\bin;E:\Portable\Miniconda3\Library\bin;E:\Portable\Miniconda3\Scripts;E:\Portable\Miniconda3\bin;
@shriprem Thanks! It worked. Your solution confirms that this is a system path issue, since generally it’s only necessary to add %Miniconda3_DIR%\Scripts to your PATH variable to use pip. Any idea why this has changed?
@EthanBackToLife I checked the PATH environment variable in the Anaconda prompt, and found that Anaconda was prefixing all those directories to its prompt PATH variable. So I appended the delta part of that path to the Windows PATH variable to confirm that it worked for pip.
While trying to install Conda on a different PC, I am able to refine the path changes to a much shorter: %Miniconda3_DIR%;%Miniconda3_DIR%\Scripts;%Miniconda3_DIR%\Library\bin
[On hindsight, we see that the other directories that were added to the path from my previous post are non-existent/empty on a fresh Conda install.]
With this narrowing down of the path, we can look at the %Miniconda3_DIR%\Library\bin folder. In here, we find files such as: libcrypto-1_1-x64.dll, libcrypto-1_1-x64.pdb, libssl-1_1-x64.dll, openssl.exe, libssl-1_1-x64.pdb, openssl.pdb which I think are critical in resolving the SSL/TLS issues with the pip (and conda) package installs.