New issue
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
fetch_california_housing() URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)> #10201
Comments
Well I hope it is very temporary... Is it still an issue? |
Hi Jnothman I first noticed this problem on friday. I am still getting the same error URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)> Kind regards Andy |
I'm not having that problem. Are you sure you don't have your clock set
incorrectly or something?
|
Hi Jnothman I am using a mac book pro. It looks like the time displayed on my computer could be correct. I just ran the code again and am getting the same error Any idea how I check if my clock is set correctly? Andy |
I forgot to mention. I have not looked at the code but I bet if you have already downloaded the data set to your local disk it never actually fetches so maybe thats why its working for you |
Weird, I certainly can not reproduce, and I made sure I deleted the cal_housing data from |
I experience a similar issue - Mac Book Pro, High Sierra. |
Not an expert in this SSL certificate stuff, but I don't think this is related to scikit-learn as I mentioned above. Do you get the same error with this snippet? from six.moves.urllib.request import urlretrieve
urlretrieve('https://ndownloader.figshare.com/files/5976036') |
UGH! I found the problem. python 3.6 on mac requires a post install step
" Unlike previous releases, the deprecated Apple-supplied OpenSSL libraries are no longer used. This also means that the trust certificates in system and user keychains managed by the Keychain Access application and the security command line utility are no longer used as defaults" The solution is
|
I have the same problem with python 3.6 on Ubuntu 16.04 |
Found solution here: http://blog.pengyifan.com/how-to-fix-python-ssl-certificate_verify_failed/
|
Thanks, code from nfrik worked |
Worked for me on Google Colab as well. |
On Mac with Python 3.10, a similar solution as suggested by @AEDWIP worked:
|
import ssl try: _create_unverified_https_context = ssl._create_unverified_context except AttributeError: pass else: ssl._create_default_https_context = _create_unverified_https_context |
I am going to lock this issue, the problem is not related to scikit-learn as noted above, and I don't think additional comments are super productive, not that 6 years have passed since this issue has been closed. |
Description
I am unable to use fetch_california_housing() to download sample data set. Looks like certificate may have expired?
Steps/Code to Reproduce
print('The scikit-learn version is {}.'.format(sklearn.version))
from sklearn.datasets import fetch_california_housing
housing = fetch_california_housing()
Actual Results
The text was updated successfully, but these errors were encountered: