Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Problems Compiling Python 2.6.7 for Win7

Reply
Thread Tools

Problems Compiling Python 2.6.7 for Win7

 
 
Jay Osako
Guest
Posts: n/a
 
      06-08-2011
I have been trying to get PyODBC to work with Python 2.6 (the latest
version it is known to be compatible with) and Django, but have run
into a problem which, according to the information I've got elsewhere,
probably stems from a DLL incompatibility - apparently, the standard
CPython distribution for Windows is compiled with VS2008, and there is
a required runtime library (VSC900.DLL, if I recall correctly) which
will only work if all of the other libraries used are compiled with
the exact same version (including service pack). Since VS2008 is not
readily available anymore, I am compiling PyODBC and Django-Pyodbc
using MinGW, which needless to say does not include a Visual C++
runtime library.

This leaves me with three choices: either find a copy of the exact
version of VC++ 2008 which was used to compile the distro, or compile
Python from sources with MinGW, or re-compile everything using VS2010.
Each of these approaches has had problems.

The first of these problems is, of course, tracking down a copy of VC+
+ 2008 Express. While one would think that this would be the simplest
solution, Microsfot themselves no longer provide the installer for
this, and I'm not sure I'd trust most of the other sources claiming to
provide it.

When trying to compile using VC++ 2010, I get a long series of errors,
most of which are related to headers; the headers in question are
present, but only visible in the parts of the solution which they are
part of, it seems. Trying to untangle this is likely to take more time
than I have available for this project.

When compiling using MinGW and distools, I get a problem where a file
path is coming up as None. I made some minor changes to ntpath.py to
work around places where IMAO it should have detected the missing path
string, but eventually it comes to a point where there is an assertion
that (correctly) fails on an empty path. The traceback is:

Traceback (most recent call last):
File "C:\PYTHON~1.7\setup.py", line 2036, in <module>
main()
File "C:\PYTHON~1.7\setup.py", line 2031, in main
'Lib/smtpd.py']
File "C:\Python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\Python26\lib\distutils\command\build.py", line 134, in run
self.run_command(cmd_name)
File "C:\Python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\Python26\lib\distutils\command\build_ext.p y", line 340, in
run
self.build_extensions()
File "C:\PYTHON~1.7\setup.py", line 149, in build_extensions
missing = self.detect_modules()
File "C:\PYTHON~1.7\setup.py", line 1325, in detect_modules
if os.path.isfile(os.path.join(srcdir, 'Modules',
'_elementtree.c')):
File "C:\Python26\lib\ntpath.py", line 96, in join
assert path is not None and len(path) > 0
AssertionError

I cannot seem to determine where the missing path is coming from, or
is supposed to come from, and again, walking back through the
traceback will take more time than I can afford. I mean to try it, but
I most likely will need to set it aside fiarly soon.

if anyone here could give me any information as to what I am doing
wrong, I would be sincerely grateful.
 
Reply With Quote
 
 
 
 
Gabriel Genellina
Guest
Posts: n/a
 
      06-08-2011
En Wed, 08 Jun 2011 12:28:56 -0300, Jay Osako <(E-Mail Removed)>
escribió:

> I have been trying to get PyODBC to work with Python 2.6 (the latest
> version it is known to be compatible with) and Django, but have run
> into a problem which, according to the information I've got elsewhere,
> probably stems from a DLL incompatibility - apparently, [...]
>
> The first of these problems is, of course, tracking down a copy of VC+
> + 2008 Express. While one would think that this would be the simplest
> solution, Microsfot themselves no longer provide the installer for
> this, and I'm not sure I'd trust most of the other sources claiming to
> provide it.


Doesn't http://www.microsoft.com/express/Dow...008-Visual-CPP work
for you?
I didn't try past the initial download prompt, but it seems to be the
right version.

--
Gabriel Genellina

 
Reply With Quote
 
 
 
 
Jay Osako
Guest
Posts: n/a
 
      06-09-2011
On Jun 8, 6:56*pm, "Gabriel Genellina" <(E-Mail Removed)> wrote:
> En Wed, 08 Jun 2011 12:28:56 -0300, Jay Osako <(E-Mail Removed)> *
> escribi :
>
> > I have been trying to get PyODBC to work with Python 2.6 (the latest
> > version it is known to be compatible with) and Django, but have run
> > into a problem which, according to the information I've got elsewhere,
> > probably stems from a DLL incompatibility - apparently, [...]

>
> > The first of these problems is, of course, tracking down a copy of VC+
> > + 2008 Express. While one would think that this would be the simplest
> > solution, Microsfot themselves no longer provide the installer for
> > this, and I'm not sure I'd trust most of the other sources claiming to
> > provide it.

>
> Doesn'thttp://www.microsoft.com/express/Downloads/#2008-Visual-CPPwork *
> for you?
> I didn't try past the initial download prompt, but it seems to be the *
> right version.


<kicks self> How did I overlook that?

Well, OK, that seems to just what I needed, though I still seem to be
having some trouble with the actual Django project. Thank you.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling perl 5.16.2 on cygwin on win7 fails with minperl.exe errorand I don't know fix, help me obi one visphatesjava@gmail.com Perl Misc 4 02-25-2013 11:54 PM
Win7 Pro x64 dies with BSOD on my toshiba laptop (Win7 Retail/RTM) Warren Postma Windows 64bit 6 11-20-2009 11:23 PM
Re: Cross-compiling error when compiling 2.6.1... Garrett Cooper Python 0 02-24-2009 09:47 PM
Cross-compiling error when compiling 2.6.1... Garrett Cooper Python 0 02-24-2009 08:55 PM
Compiling when libedit is in path Is there a trick to compiling Ruby when libedit must exist in the search path? Can you statically link to readline 5.0 in some manner? -- Lon Baker Lon Baker Ruby 1 03-21-2005 08:57 AM



Advertisments