Built Python 2.7 with local OpenSSL: cannot connect to HTTPS sites (PyPI)Qt 4.7 SSL error : "The certificate has expired”Building Python with SSL support in non-standard locationGetting system default ca certificates file in PythonPython 2.7 ImportError: no module named _sslHAProxy 1.5-dev19 Unable to load SSL certificateHow can I use a modified openssl library (written in C) in my python code?Building Ruby and specifying OpenSSL directoryPIP certificate issues OSXBrew Python3.7 install on Mac High OSierra 10.13.6. Help understand openssl install instructionsBuild Python with static openssl

Who enforces MPAA rating adherence?

Has there been a multiethnic Star Trek character?

Why can my keyboard only digest 6 keypresses at a time?

I have a problematic assistant manager, but I can't fire him

Traversing Oceania: A Cryptic Journey

Moving points closer to polyline using ModelBuilder?

A word that means "blending into a community too much"

60s or 70s novel about Empire of Man making 1st contact with 1st discovered alien race

CSV how to trim values to 2 places in multiple columns using UNIX

Second (easy access) account in case my bank screws up

How is the excise border managed in Ireland?

How can I get an unreasonable manager to approve time off?

Wooden cooking layout

Align equations within one column

Is using 'echo' to display attacker-controlled data on the terminal dangerous?

Bb13b9 confusion

Why are MBA programs closing?

Meaning of 'lose their grip on the groins of their followers'

Why was this person allowed to become Grand Maester?

Thread Pool C++ Implementation

sed + add word before string only if not exists

With Ubuntu 18.04, how can I have a hot corner that locks the computer?

You have (3^2 + 2^3 + 2^2) Guesses Left. Figure out the Last one

Should I ask for an extra raise?



Built Python 2.7 with local OpenSSL: cannot connect to HTTPS sites (PyPI)


Qt 4.7 SSL error : "The certificate has expired”Building Python with SSL support in non-standard locationGetting system default ca certificates file in PythonPython 2.7 ImportError: no module named _sslHAProxy 1.5-dev19 Unable to load SSL certificateHow can I use a modified openssl library (written in C) in my python code?Building Ruby and specifying OpenSSL directoryPIP certificate issues OSXBrew Python3.7 install on Mac High OSierra 10.13.6. Help understand openssl install instructionsBuild Python with static openssl






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















Up front let me say please don't suggest I switch to Python 3. That's not what this question is about. Also, note this question is not about how to find OpenSSL headers/libraries during the Python build; as far as I can tell (see below) I have that working.



I'm building my own copy of Python 2.7 (I've tried both 2.7.15 and 2.7.16 with identical results) on a recent GNU/Linux distribution. I want to link it against my own built copy of OpenSSL (I've tried 1.1.1a and 1.1.1b). Note I've used this OpenSSL library with other apps and it seems to be built correctly.



The compilation, link, and install goes fine: I've got all my configuration figured out, shared library paths set up, etc. After my compile and install, I can load the ssl module with no problems:



$ python
Python 2.7.15 (default, Mar 24 2019, 14:08:05)
[GCC 8.1.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> print(ssl.OPENSSL_VERSION)
OpenSSL 1.1.1b 26 Feb 2019


However, when I try to use this python to install some package via setup.py that need to download files, it will fail to download. I extracted a test:



from setuptools.package_index import PackageIndex
PackageIndex().process_url(url='https://pypi.org/simple/backports.functools_lru_cache/',
retrieve=True)


Gives this error:



Download error on https://pypi.org/simple/backports.functools_lru_cache/: [X509] system lib (_ssl.c:3027) -- Some packages may not be found!


I'm not sure what to do next; the error message refers to X509 so maybe there's something wrong with certificate handling? I've used strace on the binary and I can see that it is finding my system certificate directory (/etc/ssl) and my CRT file (/etc/ssl/certs/ca-certificates.crt).



Also: if I compile against my system version of OpenSSL, it works. And if I compile against a locally-build instance of LibreSSL, it also works.



I don't know where to go from here, to try to understand what the problem is. Help?










share|improve this question




























    2















    Up front let me say please don't suggest I switch to Python 3. That's not what this question is about. Also, note this question is not about how to find OpenSSL headers/libraries during the Python build; as far as I can tell (see below) I have that working.



    I'm building my own copy of Python 2.7 (I've tried both 2.7.15 and 2.7.16 with identical results) on a recent GNU/Linux distribution. I want to link it against my own built copy of OpenSSL (I've tried 1.1.1a and 1.1.1b). Note I've used this OpenSSL library with other apps and it seems to be built correctly.



    The compilation, link, and install goes fine: I've got all my configuration figured out, shared library paths set up, etc. After my compile and install, I can load the ssl module with no problems:



    $ python
    Python 2.7.15 (default, Mar 24 2019, 14:08:05)
    [GCC 8.1.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import ssl
    >>> print(ssl.OPENSSL_VERSION)
    OpenSSL 1.1.1b 26 Feb 2019


    However, when I try to use this python to install some package via setup.py that need to download files, it will fail to download. I extracted a test:



    from setuptools.package_index import PackageIndex
    PackageIndex().process_url(url='https://pypi.org/simple/backports.functools_lru_cache/',
    retrieve=True)


    Gives this error:



    Download error on https://pypi.org/simple/backports.functools_lru_cache/: [X509] system lib (_ssl.c:3027) -- Some packages may not be found!


    I'm not sure what to do next; the error message refers to X509 so maybe there's something wrong with certificate handling? I've used strace on the binary and I can see that it is finding my system certificate directory (/etc/ssl) and my CRT file (/etc/ssl/certs/ca-certificates.crt).



    Also: if I compile against my system version of OpenSSL, it works. And if I compile against a locally-build instance of LibreSSL, it also works.



    I don't know where to go from here, to try to understand what the problem is. Help?










    share|improve this question
























      2












      2








      2


      1






      Up front let me say please don't suggest I switch to Python 3. That's not what this question is about. Also, note this question is not about how to find OpenSSL headers/libraries during the Python build; as far as I can tell (see below) I have that working.



      I'm building my own copy of Python 2.7 (I've tried both 2.7.15 and 2.7.16 with identical results) on a recent GNU/Linux distribution. I want to link it against my own built copy of OpenSSL (I've tried 1.1.1a and 1.1.1b). Note I've used this OpenSSL library with other apps and it seems to be built correctly.



      The compilation, link, and install goes fine: I've got all my configuration figured out, shared library paths set up, etc. After my compile and install, I can load the ssl module with no problems:



      $ python
      Python 2.7.15 (default, Mar 24 2019, 14:08:05)
      [GCC 8.1.0] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import ssl
      >>> print(ssl.OPENSSL_VERSION)
      OpenSSL 1.1.1b 26 Feb 2019


      However, when I try to use this python to install some package via setup.py that need to download files, it will fail to download. I extracted a test:



      from setuptools.package_index import PackageIndex
      PackageIndex().process_url(url='https://pypi.org/simple/backports.functools_lru_cache/',
      retrieve=True)


      Gives this error:



      Download error on https://pypi.org/simple/backports.functools_lru_cache/: [X509] system lib (_ssl.c:3027) -- Some packages may not be found!


      I'm not sure what to do next; the error message refers to X509 so maybe there's something wrong with certificate handling? I've used strace on the binary and I can see that it is finding my system certificate directory (/etc/ssl) and my CRT file (/etc/ssl/certs/ca-certificates.crt).



      Also: if I compile against my system version of OpenSSL, it works. And if I compile against a locally-build instance of LibreSSL, it also works.



      I don't know where to go from here, to try to understand what the problem is. Help?










      share|improve this question














      Up front let me say please don't suggest I switch to Python 3. That's not what this question is about. Also, note this question is not about how to find OpenSSL headers/libraries during the Python build; as far as I can tell (see below) I have that working.



      I'm building my own copy of Python 2.7 (I've tried both 2.7.15 and 2.7.16 with identical results) on a recent GNU/Linux distribution. I want to link it against my own built copy of OpenSSL (I've tried 1.1.1a and 1.1.1b). Note I've used this OpenSSL library with other apps and it seems to be built correctly.



      The compilation, link, and install goes fine: I've got all my configuration figured out, shared library paths set up, etc. After my compile and install, I can load the ssl module with no problems:



      $ python
      Python 2.7.15 (default, Mar 24 2019, 14:08:05)
      [GCC 8.1.0] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import ssl
      >>> print(ssl.OPENSSL_VERSION)
      OpenSSL 1.1.1b 26 Feb 2019


      However, when I try to use this python to install some package via setup.py that need to download files, it will fail to download. I extracted a test:



      from setuptools.package_index import PackageIndex
      PackageIndex().process_url(url='https://pypi.org/simple/backports.functools_lru_cache/',
      retrieve=True)


      Gives this error:



      Download error on https://pypi.org/simple/backports.functools_lru_cache/: [X509] system lib (_ssl.c:3027) -- Some packages may not be found!


      I'm not sure what to do next; the error message refers to X509 so maybe there's something wrong with certificate handling? I've used strace on the binary and I can see that it is finding my system certificate directory (/etc/ssl) and my CRT file (/etc/ssl/certs/ca-certificates.crt).



      Also: if I compile against my system version of OpenSSL, it works. And if I compile against a locally-build instance of LibreSSL, it also works.



      I don't know where to go from here, to try to understand what the problem is. Help?







      python python-2.7 ssl openssl






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 24 at 18:48









      MadScientistMadScientist

      49.4k55670




      49.4k55670






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55327284%2fbuilt-python-2-7-with-local-openssl-cannot-connect-to-https-sites-pypi%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55327284%2fbuilt-python-2-7-with-local-openssl-cannot-connect-to-https-sites-pypi%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript