I am trying to install distribute using ActivePython 3.1.2 on Windows.
Running python distribute_setup.py
as described on the cheese shop give me:
No setuptools distribution found
running install Traceback (most recent call last): File "setup.py", line 177, in scripts = scripts, File "C:\Dev\Python_x86\3.1\lib\distutils\core.py", line 149, in setup dist.run_commands() File "C:\Dev\Python_x86\3.1\lib\distutils\dist.py", line 919, in run_commands self.run_command(cmd) File "C:\Dev\Python_x86\3.1\lib\distutils\dist.py", line 938, in run_command cmd_obj.run() File "build\src\setuptools\command\install.py", line 73, in run self.do_egg_install() File "build\src\setuptools\command\install.py", line 82, in do_egg_install easy_install = self.distribution.get_command_class('easy_install') File "build\src\setuptools\dist.py", line 361, in get_command_clas开发者_StackOverflow中文版s self.cmdclass[command] = cmdclass = ep.load() File "build\src\pkg_resources.py", line 1953, in load entry = import(self.module_name, globals(),globals(), ['name']) File "build\src\setuptools\command\easy_install.py", line 16, in from setuptools.sandbox import run_setup File "build\src\setuptools\sandbox.py", line 164, in fromlist=['name']).file) AttributeError: 'module' object has no attribute 'file' Something went wrong during the installation. See the error message above.
Is there possibly an unknown dependency that I'm missing?
Downloading the source tarball and executing python setup.py install
produces the exact same output.
Edit: Added the full stack trace for running the installer.
So apparently the python.org version of Python3 is different from the ActiveState version of Python3. (You should file a bug to someone (I'm not sure to whom))
The fix I have (I'm not sure of all the repercussions)
Download:
http://pypi.python.org/packages/source/d/distribute/distribute-0.6.12.tar.gz#md5=5a52e961f8d8799d243fe8220f9d760e
and then extracting it and modify: distribute-0.6.12\setuptools\sandbox.py:165 from:
except ImportError:
to
except (ImportError, AttributeError):
that will silence the error and allow you to run:
python setup.py install
It took me awhile to find a package from http://pypi.python.org/pypi?:action=browse&c=533&show=all that would actually install on either version of Python3. "files" was the first package, and since it installed I am pretty sure that easy_install is working for both copies of Python3.
...hope it works! (That's all I can help you with)
this is a bug with Distribute http://bitbucket.org/tarek/distribute/issue/151 ... it should be fixed by next release (0.6.13). It is only reproducible with PyWin32 installed; and ActivePython comes bundled with PyWin32.
精彩评论