When I build Python 3.6.7 with --libdir=/usr/lib64 I cannot import ssl

Viewed 187

I am trying to build python 3.6.7 on rhel 6.10. I have installed openssl-devel and it puts its libs in /usr/lib64. If I tell python to put its libraries in /usr/lib64 I cannot import ssl.

Python 3.6.7 (default, Nov  3 2018, 14:08:35) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/ssl.py", line 101, in <module>
    import _ssl             # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'
>>> 

But if I tell python to put its libraries in /usr/lib I am good to go.

Python 3.6.7 (default, Nov  3 2018, 14:13:21) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> 

rpm tells me where the libraries for openssl reside:

[root@0d380acc28e9 Python-3.6.7]# rpm -ql openssl-devel | grep -e 
"libcrypt" -e "libssl"
/usr/lib64/libcrypto.so
/usr/lib64/libssl.so
/usr/lib64/pkgconfig/libcrypto.pc
/usr/lib64/pkgconfig/libssl.pc

What the heck am I doing wrong?

0 Answers
Related