Pip version:
none
Python version:
2.7.13
Operating system:
vagrant oel65-i386-plain
// REPLACE ME: What are you trying to get done, what has happened, what went wrong, and what did you expect?
HUH.
[vagrant@localhost pip]$ python2.7 get-pip.py
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pip
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip
installed openssl-devel
$ sudo yum install openssl-devel
Loaded plugins: ulninfo
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package openssl-devel.i686 0:1.0.1e-57.0.1.el6 will be installed
--> Processing Dependency: krb5-devel for package: openssl-devel-1.0.1e-57.0.1.el6.i686
--> Running transaction check
---> Package krb5-devel.i686 0:1.10.3-65.el6 will be installed
--> Processing Dependency: libkadm5(x86-32) = 1.10.3-65.el6 for package: krb5-devel-1.10.3-65.el6.i686
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.10.3-65.el6.i686
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.10.3-65.el6.i686
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.10.3-65.el6.i686
--> Running transaction check
---> Package keyutils-libs-devel.i686 0:1.4-5.0.1.el6 will be installed
---> Package libcom_err-devel.i686 0:1.42.8-1.0.3.el6 will be installed
---> Package libkadm5.i686 0:1.10.3-65.el6 will be installed
---> Package libselinux-devel.i686 0:2.0.94-7.el6 will be installed
--> Processing Dependency: libsepol-devel >= 2.0.32-1 for package: libselinux-devel-2.0.94-7.el6.i686
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.0.94-7.el6.i686
--> Running transaction check
---> Package libsepol-devel.i686 0:2.0.41-4.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
openssl-devel i686 1.0.1e-57.0.1.el6 public_ol6_latest 1.2 M
Installing for dependencies:
keyutils-libs-devel i686 1.4-5.0.1.el6 public_ol6_latest 28 k
krb5-devel i686 1.10.3-65.el6 public_ol6_latest 502 k
libcom_err-devel i686 1.42.8-1.0.3.el6 public_ol6_latest 33 k
libkadm5 i686 1.10.3-65.el6 public_ol6_latest 143 k
libselinux-devel i686 2.0.94-7.el6 public_ol6_latest 136 k
libsepol-devel i686 2.0.41-4.el6 public_ol6_latest 63 k
Transaction Summary
================================================================================
Install 7 Package(s)
Total download size: 2.1 M
Installed size: 5.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): keyutils-libs-devel-1.4-5.0.1.el6.i686.rpm | 28 kB 00:00
(2/7): krb5-devel-1.10.3-65.el6.i686.rpm | 502 kB 00:00
(3/7): libcom_err-devel-1.42.8-1.0.3.el6.i686.rpm | 33 kB 00:00
(4/7): libkadm5-1.10.3-65.el6.i686.rpm | 143 kB 00:00
(5/7): libselinux-devel-2.0.94-7.el6.i686.rpm | 136 kB 00:00
(6/7): libsepol-devel-2.0.41-4.el6.i686.rpm | 63 kB 00:00
(7/7): openssl-devel-1.0.1e-57.0.1.el6.i686.rpm | 1.2 MB 00:00
--------------------------------------------------------------------------------
Total 567 kB/s | 2.1 MB 00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libsepol-devel-2.0.41-4.el6.i686 1/7
Installing : libselinux-devel-2.0.94-7.el6.i686 2/7
Installing : libcom_err-devel-1.42.8-1.0.3.el6.i686 3/7
Installing : keyutils-libs-devel-1.4-5.0.1.el6.i686 4/7
Installing : libkadm5-1.10.3-65.el6.i686 5/7
Installing : krb5-devel-1.10.3-65.el6.i686 6/7
Installing : openssl-devel-1.0.1e-57.0.1.el6.i686 7/7
Verifying : libselinux-devel-2.0.94-7.el6.i686 1/7
Verifying : libkadm5-1.10.3-65.el6.i686 2/7
Verifying : krb5-devel-1.10.3-65.el6.i686 3/7
Verifying : keyutils-libs-devel-1.4-5.0.1.el6.i686 4/7
Verifying : libcom_err-devel-1.42.8-1.0.3.el6.i686 5/7
Verifying : openssl-devel-1.0.1e-57.0.1.el6.i686 6/7
Verifying : libsepol-devel-2.0.41-4.el6.i686 7/7
Installed:
openssl-devel.i686 0:1.0.1e-57.0.1.el6
Dependency Installed:
keyutils-libs-devel.i686 0:1.4-5.0.1.el6 krb5-devel.i686 0:1.10.3-65.el6
libcom_err-devel.i686 0:1.42.8-1.0.3.el6 libkadm5.i686 0:1.10.3-65.el6
libselinux-devel.i686 0:2.0.94-7.el6 libsepol-devel.i686 0:2.0.41-4.el6
Complete!
re-config, re-make, re-install python
// REPLACE ME: Paste a log of command(s) you ran and pip's output, tracebacks, etc, here
as above
also update-ca-trust
Hi @ljgww!
Could you tell me what's the output of doing python -c "import ssl; print(ssl.OPENSSL_VERSION)"
, using your custom built python?
I managed to resolve the issue by downloading and compiling OpenSSL libraries from source.
Compiling SSL got standard OpenSSL library in place where compiling of Python is looking (this part effectively included SSL in Python compilation that was skipped before since make could not find standard SSL on Oracle Linux)
After re-compiling Python make did get SSL functional in python, and therefore could finally do PIP. Will give more details later to see if this is valid procedure.
Steps that fixed the problem with SSL compiling into Python and consequent get-pip failure because of lack of SSL support in Python.
execute (for SSL to compile and install)
./Configure
make
sudo make install
Finally - redo the Python compilation (configure, make, make install - repeat compiling proces for Python), observe that ssl library now compiles into Python as it appears in standard place where Python compiling procedure is looking for,
Test new python: python2.7 get-pip.py - latest pip shall install and work as it should.
Running ./Configure to install ssh (step 4) above made me Nuts, it was showing errors related perl modules and so on.
./config --prefix="
And had to copy Edit and Copy Modules/Setup.dist as described in https://stackoverflow.com/questions/5937337/building-python-with-ssl-support-in-non-standard-location?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
However thanks a lot!
Regards,
Suresh
@ljgww
how to re-configure and re-make python in the fifth step that you mentioned ?
Essentially ... Repeat step 4 once more (but now you shall have openssl installed, correct?)
(Edit: i fixed my original recipe to be more clear what compilation is in question)
Essentially if you do not have SSL in place first compiling of python will not include SSL.
However if you do compile and install SSL
then python will recognize SSL being in place and will include it.
Note that as observed in newer versions of 2.7 there may be SSL provided by python itself which may (or may not) become preferential library used.
import ssl
in python shell to test
With newer versions of python I discovered that there is a set of options that one can pass to python compiling/configuring but I did not find a good reference what can be used. For example 2.7.15 comes with python SSL library (optionally)
However above mentioned:
./Configure --prefix=xxx
shall be some of options of target location where installation will place compiled python. Read somewhere you can get them with:
./Configure --help
as to prefix typical (and default) prefix shall be /usr/local (this means when doing install python exec will appear as /usr/local/bin/pythonx.x
Be careful when using --prefix=/usr as you may overwrite sytem python on some linuxes (I ruined once and took me days to recover /usr will translate to /usr/bin/python....)
I have no idea what would happen on --prefix='' (essentially set to nothing). I can expect two outcomes: 1. installing default (/usr/local) or maybe installing in current folder (essentially not installing). Would like to hear what are experiences with this.
since here PIP in question observe Configure option:
--with(out)-ensurepip=[=OPTION]
"install" or "upgrade" using bundled pip, default is
"no"
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Steps that fixed the problem with SSL compiling into Python and consequent get-pip failure because of lack of SSL support in Python.
execute (for SSL to compile and install)
./Configure
make
sudo make install
Finally - redo the Python compilation (configure, make, make install - repeat compiling proces for Python), observe that ssl library now compiles into Python as it appears in standard place where Python compiling procedure is looking for,
Test new python: python2.7 get-pip.py - latest pip shall install and work as it should.