Can't install distribute 0.6.12 on windows

Anonymous avatarAnonymous created an issue

Trying to install distribute 0.6.12 on windows fails with the following errors, either using the distribute_setup.py script or the usual python setup.py install dance:

C:\winp>distribute_setup.py
Extracting in c:\users\pachi\appdata\local\temp\tmpwp0pwd
Now working in c:\users\pachi\appdata\local\temp\tmpwp0pwd\distribute-0.6.12
Installing Distribute
Before install bootstrap.
Scanning installed packages
No setuptools distribution found
running install
Traceback (most recent call last):
  File "setup.py", line 177, in <module>
    scripts = scripts,
  File "C:\winp\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\winp\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "C:\winp\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "c:\users\pachi\appdata\local\temp\tmpwp0pwd\distribute-0.6.12\setuptools
\command\install.py", line 73, in run
    self.do_egg_install()
  File "c:\users\pachi\appdata\local\temp\tmpwp0pwd\distribute-0.6.12\setuptools
\command\install.py", line 82, in do_egg_install
    easy_install = self.distribution.get_command_class('easy_install')
  File "c:\users\pachi\appdata\local\temp\tmpwp0pwd\distribute-0.6.12\setuptools
\dist.py", line 361, in get_command_class
    self.cmdclass[command] = cmdclass = ep.load()
  File "c:\users\pachi\appdata\local\temp\tmpwp0pwd\distribute-0.6.12\pkg_resour
ces.py", line 1953, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "c:\users\pachi\appdata\local\temp\tmpwp0pwd\distribute-0.6.12\setuptools
\command\easy_install.py", line 16, in <module>
    from setuptools.sandbox import run_setup
  File "c:\users\pachi\appdata\local\temp\tmpwp0pwd\distribute-0.6.12\setuptools
\sandbox.py", line 163, in <module>
    fromlist=['__name__']).__file__)
AttributeError: 'module' object has no attribute '__file__'
Something went wrong during the installation.
See the error message above.

C:\winp>cd distribute-0.6.12

C:\winp\distribute-0.6.12>python setup.py install
Before install bootstrap.
Scanning installed packages
No setuptools distribution found
running install
Traceback (most recent call last):
  File "setup.py", line 177, in <module>
    scripts = scripts,
  File "C:\winp\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\winp\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "C:\winp\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "C:\winp\distribute-0.6.12\setuptools\command\install.py", line 73, in ru
n
    self.do_egg_install()
  File "C:\winp\distribute-0.6.12\setuptools\command\install.py", line 82, in do
_egg_install
    easy_install = self.distribution.get_command_class('easy_install')
  File "C:\winp\distribute-0.6.12\setuptools\dist.py", line 361, in get_command_
class
    self.cmdclass[command] = cmdclass = ep.load()
  File "C:\winp\distribute-0.6.12\pkg_resources.py", line 1953, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "C:\winp\distribute-0.6.12\setuptools\command\easy_install.py", line 16,
in <module>
    from setuptools.sandbox import run_setup
  File "C:\winp\distribute-0.6.12\setuptools\sandbox.py", line 163, in <module>
    fromlist=['__name__']).__file__)
AttributeError: 'module' object has no attribute '__file__'

C:\winp\distribute-0.6.12>

Commenting out the following block in setuptools/sandbox.py makes it succeed:

#if not sys.version < '2.5':
#    try:
#        gen_py = os.path.dirname(__import__('win32com.gen_py',
#                                            fromlist=['__name__']).__file__)
#        _EXCEPTIONS.append(gen_py)
#    except ImportError:
#        pass

Having a look to win32com, gen_py is just an empty dir (not even a package with an init.py file in it).

Comments (3)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.