[SSL: TLSV1_ALERT_PROTOCOL_VERSION] when installing python packages - Solution


SSL: TLSV1_ALERT_PROTOCOL_VERSION this error is very crucial while performing python programs, this happens due to the incompatibility of devices or using the old versions. This article explains the detailed solution to the SSL: TLSV1_ALERT_PROTOCOL_VERSION and step by step guide to recover from the issue. This solution is applicable to OS X.

  1. First check in the Terminal which version of OpenSSL you have:

    $ python3 -c "import SSL; print(SSL.OPENSSL_VERSION)" >> OpenSSL 0.9.8zh 14 Jan 2016
  2. If your OpenSSL is old then this solution may not work for you so, first, you have to update the python to the latest version. An important step for updating python is as follows.

    $ brew update $ brew install OpenSSL $ brew install python3
    You can check which SSL version you are using by using this trick to mount a requests session with ssl_version=ssl.PROTOCOL_TLSv1_2. If wrong SSL versions are used then SSL23_GET_SERVER_HELLO error appears.

  3. If you are facing problems related to the path or version of python then you can create new virtualenv to make sure newest version of python is installed in your computer system.

    $ virtualenv web app --python=python3.6


So, in summary, we can say that if you are getting a TLSV1_ALERT_PROTOCOL_VERSION error in Python, then it may happen because of your system cant support TLS v1.2. To add support, you can check for following things.

  • OpenSSL 1.0.1
  • Python 3.4
  • requests[security]

Solution Worked 2 UpvotesUpvote


Solution Didn't Worked 1 DownvotesDownvote



Play 2048 Game Online

Search Tags