This morning I tried install pygame on windows command prompt and get an error like this:
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\User>pip install pygame
Collecting pygame
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pygame/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pygame/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pygame/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pygame/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pygame/
Could not fetch URL https://pypi.org/simple/pygame/: There was a problem confi
rming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max r
etries exceeded with url: /simple/pygame/ (Caused by SSLError(SSLCertVerificatio
nError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to
get local issuer certificate (_ssl.c:1045)'))) - skipping
Could not find a version that satisfies the requirement pygame (from versions:
)
No matching distribution found for pygame
C:\Users\User>
So I tried running anaconda to install pygame, but I get another error.
(base) C:\Users\User>conda install -c cogsci pygame
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pk
gs/pro/win-64/repodata.json.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443
): Max retries exceeded with url: /pkgs/pro/win-64/repodata.json.bz2 (Caused by
SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'ssl3_get_server_ce
rtificate\', \'certificate verify failed\')])")))'))
(base) C:\Users\User>
I can't understand the error.The command was working before but it doesn't work now.I thought it is connection error but I can run any website smoothly.What should I do?
It's possible to install PyGame on Windows by visiting pygame.org and downloading an .MSI installer. This does not rely on pip or anaconda.
The issue you are receiving seems to be an SSL certificate problem, and is nothing to do with PyGame. Both your installation methods are having the same problem with SSL.
Related
I'm trying to get this module installed however it seems there's some issue. Is anyone able to make sense of what is happening?
H:\>pip install pywin32
Defaulting to user installation because normal site-packages is not writeable
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /simple/pywin32/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /simple/pywin32/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /simple/pywin32/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /simple/pywin32/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /simple/pywin32/
Could not fetch URL https://pypi.org/simple/pywin32/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pywin32/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))) - skipping
ERROR: Could not find a version that satisfies the requirement pywin32 (from versions: none)
ERROR: No matching distribution found for pywin32
Specify Python Interpreter
Try running the below command by appending the Python command to it. This will ensure the correct Python interpreter is specified and the packages will be installed over there.
If you are using Python 3:
python3 -m pip install [package_name]
If you are using Python 2:
python -m pip install [package_name]
While running
pip install ibm_watson
I am getting the below error. I am using the latest anaconda and the latest python version 3.9.2.
Could not fetch URL https://pypi.org/simple/ibm-watson/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/ibm-watson/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))) - skipping
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))': /simple/ibm-watson/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))': /simple/ibm-watson/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))': /simple/ibm-watson/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))': /simple/ibm-watson/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))': /simple/ibm-watson/
ERROR: Could not find a version that satisfies the requirement ibm_watson
ERROR: No matching distribution found for ibm_watson
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(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))) - skipping
This problem seems unrelated to the ibm-watson library, judging by the error cause in the stacktrace:
'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'
First check if OPENSSLDIR (or the corresponding environment variable in your OS) is set to the correct path containing your tls certificates. If you are using macOS, check this answer: https://stackoverflow.com/a/53310545/15385777
You can also try updating pip to the last version and installing certifi first before checking if ibm-watson can be installed:
python -m pip install --upgrade pip
pip install certifi
pip install ibm-watson
I hope this answer helps you.
I have created a virtual enviroment and then installed kedro on it. Now, created a new kedro project and after that while installing dependencies. I am getting the following error:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /simple/flake8/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /simple/flake8/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /simple/flake8/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /simple/flake8/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /simple/flake8/
Could not find a version that matches flake8<4.0,>=3.7.9 (from -r C:\Users\schaudha\wetting_dispersing_agent\src\requirements.in (line 2))
No versions found
Was https://pypi.org/simple reachable?
Does warning means all packages are installed ?
How to check whether packages are installed or not?
there is no log saying .... package installed ... thereby i suspect they are not installed.
Many thanks in advance for help.
This is pip install error rather than actual package error. You should have a look at how your setup reaches PyPI. I can see that a flake8 version complying with the requirement flake8<4.0,>=3.7.9.
https://pypi.org/project/flake8/3.8.4/
I was trying to install python packages in PyCharm. But I cannot see any Latest version as below:
I used pip to install some packages and it is not working and showing:
(base) C:\>pip install auto-py-to-exe
Collecting auto-py-to-exe
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/auto-py-to-exe/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/auto-py-to-exe/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/auto-py-to-exe/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/auto-py-to-exe/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/auto-py-to-exe/
Could not fetch URL https://pypi.org/simple/auto-py-to-exe/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/auto-py-to-exe/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))) - skipping
Then I tried with trusted host cmd:
(base) C:>pip install auto-py-to-exe --trusted-host pypi.org --trusted-host files.pythonhosted.org
Then it shows "Could not find a version that satisfies the requirement auto-py-to-exe (from versions: )
No matching distribution found for auto-py-to-exe"
So I tried to give it a version command:
(base) C:>pip install auto-py-to-exe from versions 2.7.5 --trusted-host pypi.org --trusted-host files.pythonhosted.org
However still shows the same issue here:
Collecting auto-py-to-exe
Could not find a version that satisfies the requirement auto-py-to-exe (from versions: )
No matching distribution found for auto-py-to-exe
Then I am out... So if anyone has any ideas, please help. Many thanks.
Follow the following https://datatofish.com/upgrade-pip/ to upgrade your pip.
You can also try manual installation: (https://pip.pypa.io/en/stable/installing/)
Download: https://bootstrap.pypa.io/get-pip.py
python get-pip.py
I'm trying to use virtualenv on my Mac (El Capitan) but something must have changed recently, as it's no longer working, and complains about SSL problems.
It's the first time I've had to use this project in about 9 months, and in that time, I've not changed anything on my system regarding Python.
In an effort to get it working, over the past day or so I've uninstalled virtualenv, manually deleted some files (I found these instructions in a GitHub issue, but I can't find them again to provide a link, but if I remember correctly, it was just deleting broken symlinks and directories relating to virtualenv,) and then uninstalled Python via Brew, leaving me with a system that had no Python, pip, or virtualenv libraries or executables on it.
Then I ran brew install python2 to get Python installed. Then I ran pip install virtualenv which gave me the same SSL error as before. I manually downloaded virtualenv from the URL pip was trying to download it from, and then pip installed it locally using the downloaded file. This worked. However, when I then run virtualenv venv, I still get the same SSL error.
I've seen issues offering all kinds of advice, from downloading DigiCertHighAssuranceEVRootCA.pem and using it via the --cert option, creating a pip.ini file with trusted-host=files.pythonhosted.org in it, using the --trusted-host option, using a different network that isn't my company's corporate network, but none of it so far has worked for me.
I am consistently getting the following SSL error whenever I try to pip install anything, or, in this specific example, create a new virtualenv:
New python executable in /Users/apl/Projects/fdm/FDM-fordele/venv/bin/python2.7
Also creating executable in /Users/apl/Projects/fdm/FDM-fordele/venv/bin/python
Installing setuptools, pip, wheel...
Complete output from command /Users/apl/Projects/...e/venv/bin/python2.7 - setuptools pip wheel:
Looking in links: /usr/local/lib/python2.7/site-packages, /usr/local/lib/python2.7/site-packages/virtualenv_support, /usr/local/lib/python2.7/site-packages/virtualenv_support
Collecting setuptools
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),)': /s/files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl?X-OpenDNS-Session=_0a895c9402cc904c260a26007e7f555cbe499270f445_8d79d41f_
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),)': /s/files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl?X-OpenDNS-Session=_0a895c9402cc904c260a26007e7f555cbe499270f445_8d79d41f_
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),)': /s/files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl?X-OpenDNS-Session=_0a895c9402cc904c260a26007e7f555cbe499270f445_8d79d41f_
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),)': /s/files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl?X-OpenDNS-Session=_0a895c9402cc904c260a26007e7f555cbe499270f445_8d79d41f_
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),)': /s/files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl?X-OpenDNS-Session=_0a895c9402cc904c260a26007e7f555cbe499270f445_8d79d41f_
Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org.x.0a895c9402cc904c260a26007e7f555cbe49.9270f445.id.opendns.com', port=443): Max retries exceeded with url: /s/files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl?X-OpenDNS-Session=_0a895c9402cc904c260a26007e7f555cbe499270f445_8d79d41f_ (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),))
Is there some other way I can get this to work? This project cannot be deployed (using an Ansible role called ansistrano) because of this error.
EDIT:
I just tried uninstalling/removing Virtualenv, Pip and Python again, reinstalling Python, then manually installing pip with https://bootstrap.pypa.io/get-pip.py, which gives:
Collecting pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),)': /s/files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl?X-OpenDNS-Session=_0cf307740aff804587084980d2ecedab4cc89270f445_80300092_
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),)': /s/files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl?X-OpenDNS-Session=_0cf307740aff804587084980d2ecedab4cc89270f445_80300092_
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),)': /s/files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl?X-OpenDNS-Session=_0cf307740aff804587084980d2ecedab4cc89270f445_80300092_
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),)': /s/files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl?X-OpenDNS-Session=_0cf307740aff804587084980d2ecedab4cc89270f445_80300092_
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),)': /s/files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl?X-OpenDNS-Session=_0cf307740aff804587084980d2ecedab4cc89270f445_80300092_
Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org.x.0cf307740aff804587084980d2ecedab4cc8.9270f445.id.opendns.com', port=443): Max retries exceeded with url: /s/files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl?X-OpenDNS-Session=_0cf307740aff804587084980d2ecedab4cc89270f445_80300092_ (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),))
So it turns out that this is because the company I work for use Cisco's Umbrella DNS security system, that inserts itself in all DNS requests. This breaks SSL in Python, apparently, even though I can successfully manually download the file with curl.
By adding
151.101.1.63 files.pythonhosted.org
to my hosts file, I was able to get a system that behaved exactly as expected. Hope this helps others in the future who also are forced to go through Umbrella.