[wxPython-users] wxPython install

Robin Dunn robin at alldunn.com
Fri Mar 7 18:18:51 PST 2008


Gordon Robertson wrote:
> I'm trying to convert a running copy of python 2.4 to a debug copy by compiling 
> the source as a debug version and exchanging the files as required. I compiled 
> wxWidgets, apparently with success, although I don't see any files marked 
> 'dll'. They are all 'lib' files. I used wx_dll.dsw with Visual Studio 9 IDE 
> (VCExpress). 

Did you select one of the DLL build configs once you were in visstudio? 
   It should put the DLLS in the {WXWIN}/lib/vc_dll directory.  If you 
still have trouble with it you might be better off using the command 
line build for wxWidgets too as described in the build doc on the 
website.  That way you can be more sure which build config is being used.


> 
> I tried running 'python_d setup.py build_ext --inplace MONOLITHIC=0 --debug' 
> using python_d.exe. It seems to run OK but the setup stopped after this:
> 
> Preparing CORE...
> Preparing GLCANVAS...
> Preparing STC...
> Preparing ACTIVEX...
> Preparing GIZMOS...
> running build_ext
> 
> where I got this error:
> 
> FILE "f:\python24\lib\distutils\msvccompiler.py", line 124 in load_macros 
> self_set macro..blah blah..
> 
> the code from msvccompiler is below, with line 124 marked:
> 
> ***
> def load_macros(self, version):
>         vsbase = r"Software\Microsoft\VisualStudio\%0.1f" % version
>         self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir")
>         self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir")  <--
> line 124
>         net = r"Software\Microsoft\.NETFramework"
>         self.set_macro("FrameworkDir", net, "installroot")
>         try:
>             if version > 7.0:
>                 self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1")
>             else:
>                 self.set_macro("FrameworkSDKDir", net, "sdkinstallroot")
>         except KeyError, exc: #
>             raise DistutilsPlatformError, \
>                   ("""Python was built with Visual Studio 2003;
> extensions must be built with a compiler than can generate compatible binaries.
> Visual Studio 2003 was not found on this system. If you have Cygwin installed,
> you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""")
> 
> ***
> 
> Obviously it can't find the product directory for VCExpress, and is looking 
> under HKLM/Software/Microsoft/VisualStudio/9.0 in the registry.I have 
> confirmed that by feeding it different paths in that registry hive and 
> affecting the error by doing so. Problem is, I don't know what path it's 
> looking for.

In my registry ...\VisualStudio\7.1\Setup\VC\ProductDir is set to 
"C:\TOOLS\VisStudio7\VC7" where C:\TOOLS\VisStudio7 is the root of the 
install.  The ...\VS\... value is set to C:\TOOLS\VisStudio7.

You might just try to ensuring that the dir where cl.exe and link.exe 
are located is on the PATH.  I know that at least in the past distutils 
would still work if all it could do is use the environment.  You may 
also have to set INCLUDE and LIB in the environment to allow the 
standard include and lib paths to be used too.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list