Building Python 3.7.1 - SSL module failed

前端 未结 6 1535
北荒
北荒 2020-12-02 21:31

Building Python 3.7 from source runs into following error:

Failed to build these modules:
_hashlib              _ssl                                     

Co         


        
6条回答
  •  时光取名叫无心
    2020-12-02 21:55

    Edit setup.py

    Find the following lines:

            system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
        system_include_dirs = ['/usr/include']
    

    ...and place each folder at the beginning of its respective list.


    In my case I had to add: /usr/local/lib and /usr/local/include:

            system_lib_dirs = ['/usr/local/lib', '/lib64', '/usr/lib64', '/lib', '/usr/lib']
        system_include_dirs = ['/usr/local/include', '/usr/include']
    

    Finally: make distclean && ./configure

    You may want to ensure that export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH (or what have you) is added to the very end of /etc/profile and reboot, as well.

提交回复
热议问题