Cmake is not able to find Python-libraries

后端 未结 10 1537
太阳男子
太阳男子 2020-12-02 16:53

Getting this error:

sudo: unable to resolve host coderw@ll
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) 
CMake Error at /usr         


        
10条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 17:44

    This problem can also happen in Windows. Cmake looks into the registry and sometimes python values are not set. For those with similar problem:

    http://ericsilva.org/2012/10/11/restoring-your-python-registry-in-windows/

    Just create a .reg file to set the necessary keys and edit accordingly to match your setup.

    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Python]
    
    [HKEY_CURRENT_USER\Software\Python\Pythoncore]
    
    [HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6]
    
    [HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6\InstallPath]
    @="C:\\python26"
    
    [HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6\PythonPath]
    @="C:\\python26;C:\\python26\\Lib\\;C:\\python26\\DLLs\\"
    
    [HKEY_CURRENT_USER\Software\Python\Pythoncore\2.7]
    
    [HKEY_CURRENT_USER\Software\Python\Pythoncore\2.7\InstallPath]
    @="C:\\python27"
    
    [HKEY_CURRENT_USER\Software\Python\Pythoncore\2.7\PythonPath]
    @="C:\\python27;C:\\python27\\Lib\\;C:\\python27\\DLLs\\"
    

提交回复
热议问题