sradz
sradz

Reputation: 11

ssl certificate verify failed on python when trying to install a programme

I have almost no coding experience and am trying to install some software on my mac (osX Yosemite). The software os the FSL package to virtually visualise neuroanatomy. The instructions for installing it can be found at https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/MacOsX Whenever I try to install it i get the code

olegs-MacBook-Air-4:Downloads Sonya$ cd ~/Downloads
olegs-MacBook-Air-4:Downloads Sonya$ python fslinstaller.py
--- FSL Installer - Version 3.0.11 ---
[Warning] Some operations of the installer require administative rights,
    for example installing into the default folder of /usr/local.
    If your account is an 'Administrator' (you have 'sudo' rights)
    then you will be prompted for your administrator password
    when necessary.
When asked a question, the default answer is given in square brackets.
Hit the Enter key to accept this default answer.

[FAILED] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)
olegs-MacBook-Air-4:Downloads Sonya$

Really don't know what to do about this, any help would be appreciated

UPDATE I've just tried the same command again and have now got the code

olegs-MacBook-Air-4:~ Sonya$ cd ~/Downloads
olegs-MacBook-Air-4:Downloads Sonya$ python fslinstaller.py
--- FSL Installer - Version 3.0.11 ---
[Warning] Some operations of the installer require administative rights,
    for example installing into the default folder of /usr/local.
    If your account is an 'Administrator' (you have 'sudo' rights)
    then you will be prompted for your administrator password
    when necessary.
When asked a question, the default answer is given in square brackets.
Hit the Enter key to accept this default answer.


[FAILED] nodename nor servname provided, or not known

Upvotes: 1

Views: 2811

Answers (2)

Xadiss
Xadiss

Reputation: 21

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

Put this code on the top of fslinstaller.py and run python fslinstaller.py. In my case it worked.

Upvotes: 2

Patrick Stetz
Patrick Stetz

Reputation: 495

Not sure if you're still having trouble, but I think your problem may be the same as this one

The solution is to change python fslinstaller.py to /usr/bin/python fslinstaller.py.

If this doesn't work it may be the full path to your python is wrong. You can find the right one with which python, which python2, or which python2.7. One of these will probably work

In my case I needed to run the command sudo /usr/bin/python2.7 fslinstaller.py and the installer worked

Upvotes: 3

Related Questions