Problem installing in Python 2.5 64 bit

Issue #2436 resolved
Former user created an issue

I get the following error when installing SQLAlchemy using PIP:

building 'sqlalchemy.cprocessors' extension
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Mario\Desktop\winappdbg\trunk\build\sqlalchemy\setup.py", line 179, in <module>
    run_setup(True)
  File "C:\Users\Mario\Desktop\winappdbg\trunk\build\sqlalchemy\setup.py", line 147, in run_setup
    **kwargs
  File "C:\Python25-x64\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Python25-x64\lib\distutils\dist.py", line 974, in run_commands
    self.run_command(cmd)
  File "C:\Python25-x64\lib\distutils\dist.py", line 994, in run_command
    cmd_obj.run()
  File "c:\python25-x64\lib\site-packages\distribute-0.6.21-py2.5.egg\setuptools\command\install.py", line 53, in run
    return _install.run(self)
  File "C:\Python25-x64\lib\distutils\command\install.py", line 506, in run
    self.run_command('build')
  File "C:\Python25-x64\lib\distutils\cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "C:\Python25-x64\lib\distutils\dist.py", line 994, in run_command
    cmd_obj.run()
  File "C:\Python25-x64\lib\distutils\command\build.py", line 112, in run
    self.run_command(cmd_name)
  File "C:\Python25-x64\lib\distutils\cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "C:\Python25-x64\lib\distutils\dist.py", line 994, in run_command
    cmd_obj.run()
  File "C:\Users\Mario\Desktop\winappdbg\trunk\build\sqlalchemy\setup.py", line 64, in run
    build_ext.run(self)
  File "C:\Python25-x64\lib\distutils\command\build_ext.py", line 290, in run
    self.build_extensions()
  File "C:\Python25-x64\lib\distutils\command\build_ext.py", line 416, in build_extensions
    self.build_extension(ext)
  File "C:\Users\Mario\Desktop\winappdbg\trunk\build\sqlalchemy\setup.py", line 70, in build_extension
    build_ext.build_extension(self, ext)
  File "C:\Python25-x64\lib\distutils\command\build_ext.py", line 481, in build_extension
    depends=ext.depends)
  File "C:\Python25-x64\lib\distutils\msvccompiler.py", line 354, in compile
    if not self.initialized: self.initialize()
  File "C:\Python25-x64\lib\distutils\msvccompiler.py", line 264, in initialize
    self.__paths = self.get_msvc_paths("path")
  File "C:\Python25-x64\lib\distutils\msvccompiler.py", line 616, in get_msvc_paths
    % (self.__root, self.__version))
AttributeError: MSVCCompiler instance has no attribute '_MSVCCompiler__root'

For Python 2.5 32 bits the installer works fine. I'm running from the Visual Studio console to be able to compile the C extensions.

Comments (4)

  1. Former user Account Deleted

    I'm aware this may not be a SQLALchemy issue at all, but I thought it would still be a good idea to document it here, in case it happens to someone else. If it turns out to be a problem in another library I'll open another ticket there.

  2. Former user Account Deleted

    Looking up a bit more it appears to be a problem with that version of Python when installing anything that requires C modules to be compiled with Visual Studio in 64 bit platforms.

    http://bugs.python.org/issue7509

    My workaround was to insert this at line 249 in C:\Python25-x64\Lib\distutils\msvccompiler.py:

    self.__root = r"Software\Microsoft\VisualStudio"
    
  3. Log in to comment