<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>On a 64 bit Windows 7 machine, the call to find the python libraries using the FindPythonLibs.cmake module is not finding where python is installed. I tried this with both version 2.8.4 and with 2.8.5 of CMake, with Python 2.7 installed. Using the same code, FindPythonLibs works ok on my Windows XP machine.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I did some investigation, and it looks like reading the windows registry in Windows 7 is no longer working. The FindPythonLibs module makes a call to Find_Library, telling it to also check a registry key:<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>FIND_LIBRARY(PYTHON_LIBRARY<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; PATHS<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; # Avoid finding the .dll in the PATH.&nbsp; We want the .lib.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; NO_SYSTEM_ENVIRONMENT_PATH<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>&nbsp; )<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>On my Windows 7 machine, the registry key <span style='font-family:"Courier New"'>[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]</span> (where _<i>CURRENT</i>_VERSION is 2.7) exists and the default key contains the correct path to the python libraries yet PYTHON_LIBRARY gets set to NotFound. Per the FAQS and the thread posted at <a href="http://cmake.3232098.n2.nabble.com/Reading-registry-broken-on-Windows-7-td4030673.html">http://cmake.3232098.n2.nabble.com/Reading-registry-broken-on-Windows-7-td4030673.html</a>, I tried using SET_FILENAME_COMPONENT to read the contents of the registry key. The result is the variable being set to \registry instead of the correct path to the python libraries.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Is there another way to find the install location of the python libraries that works on Windows 7 and Windows XP, 32 bit and 64 bit machines?<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Theresa<o:p></o:p></p></div></body></html>