Python Requests throwing SSLError

前端 未结 24 2553
小蘑菇
小蘑菇 2020-11-22 02:49

I\'m working on a simple script that involves CAS, jspring security check, redirection, etc. I would like to use Kenneth Reitz\'s python requests because it\'s a great piec

24条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 03:39

    Too late to the party I guess but I wanted to paste the fix for fellow wanderers like myself! So the following worked out for me on Python 3.7.x

    Type the following in your terminal

    pip install --upgrade certifi      # hold your breath..
    

    Try running your script/requests again and see if it works (I'm sure it won't be fixed yet!). If it didn't work then try running the following command in the terminal directly

    open /Applications/Python\ 3.6/Install\ Certificates.command  # please replace 3.6 here with your suitable python version
    

提交回复
热议问题