Problems Compiling Python 2.6.7 for Win7

Discussion in 'Python' started by Jay Osako, Jun 8, 2011.

  1. Jay Osako

    Jay Osako Guest

    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.py", 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.
    Jay Osako, Jun 8, 2011
    #1
    1. Advertising

  2. En Wed, 08 Jun 2011 12:28:56 -0300, Jay Osako <>
    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/Downloads/#2008-Visual-CPP work
    for you?
    I didn't try past the initial download prompt, but it seems to be the
    right version.

    --
    Gabriel Genellina
    Gabriel Genellina, Jun 8, 2011
    #2
    1. Advertising

  3. Jay Osako

    Jay Osako Guest

    On Jun 8, 6:56 pm, "Gabriel Genellina" <> wrote:
    > En Wed, 08 Jun 2011 12:28:56 -0300, Jay Osako <>  
    > 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.
    Jay Osako, Jun 9, 2011
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. W. eWatson
    Replies:
    22
    Views:
    731
    Steven D'Aprano
    Feb 24, 2010
  2. W. eWatson
    Replies:
    10
    Views:
    337
    alex23
    Mar 2, 2010
  3. James Ravenscroft

    Python Library Win7 -64 Bit

    James Ravenscroft, Jun 15, 2010, in forum: Python
    Replies:
    1
    Views:
    348
    Martin v. Loewis
    Jun 15, 2010
  4. W. eWatson
    Replies:
    21
    Views:
    1,054
    John Gordon
    Nov 23, 2011
  5. Replies:
    4
    Views:
    237
    johannes falcone
    Feb 25, 2013
Loading...

Share This Page