如何安装 Python 3 的分发版
我正在尝试在 Windows 上使用 ActivePython 3.1.2 安装 distribute 。
按照奶酪店的描述运行 python allocate_setup.py 给我:
未找到 setuptools 发行版
运行安装
回溯(最近一次调用最后一次):
文件“setup.py”,第 177 行,位于
脚本=脚本,
文件“C:\Dev\Python_x86\3.1\lib\distutils\core.py”,第 149 行,设置
dist.run_commands()
文件“C:\Dev\Python_x86\3.1\lib\distutils\dist.py”,第 919 行,在 run_commands
self.run_command(cmd)
文件“C:\Dev\Python_x86\3.1\lib\distutils\dist.py”,第 938 行,在 run_command
cmd_obj.run()
文件“build\src\setuptools\command\install.py”,第 73 行,运行
self.do_egg_install()
文件“build\src\setuptools\command\install.py”,第 82 行,位于 do_egg_install
easy_install = self.distribution.get_command_class('easy_install')
文件“build\src\setuptools\dist.py”,第 361 行,在 get_command_class
self.cmdclass[命令] = cmdclass = ep.load()
文件“build\src\pkg_resources.py”,第 1953 行,加载
条目 = 导入(self.module_name, globals(),globals(), ['名称'])
文件“build\src\setuptools\command\easy_install.py”,第 16 行,位于
从 setuptools.sandbox 导入 run_setup
文件“build\src\setuptools\sandbox.py”,第 164 行,位于
fromlist=['名称']).文件)
AttributeError:“模块”对象没有属性“文件”
安装过程中出现问题。
请参阅上面的错误消息。
我是否可能缺少未知的依赖项?
下载源 tarball 并执行 python setup.py install 会产生完全相同的输出。
编辑:添加了运行安装程序的完整堆栈跟踪。
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_class
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显然,Python3 的 python.org 版本与 Python3 的 ActiveState 版本不同。 (您应该向某人提交错误(我不确定向谁))
我的修复(我不确定所有影响)
下载:
http://pypi.python.org/packages/source/d/distribute/distribute-0.6 .12.tar.gz#md5=5a52e961f8d8799d243fe8220f9d760e
然后解压并修改:
分发-0.6.12\setuptools\sandbox.py:165
from:
to
将会消除错误并允许您运行:
python setup.py install
我花了一段时间才从 http://pypi.python.org/pypi?:action=browse&c=533&show=all 这实际上< /em> 在任一版本的 Python3 上安装。 “files”是第一个包,自从它安装后我非常确定 easy_install 适用于 Python3 的两个副本。
...希望它有效! (我能帮你的就是这些了)
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:
to
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)
这是分发 http://bitbucket.org/tarek/distribute/issue/151< 的错误/a> ...它应该在下一个版本(0.6.13)中修复。它只能在安装了 PyWin32 的情况下重现; ActivePython 与 PyWin32 捆绑在一起。
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.