gpt4 book ai didi

python - 在Python中安装Psyco的奇怪错误

转载 作者:行者123 更新时间:2023-12-01 06:17:03 24 4
gpt4 key购买 nike

我已经在一台机器上安装了 psyco,没有任何问题,但在另一台机器上安装时遇到了奇怪的错误。我无法使用 easy_install,因为它给了我一个错误:

C:\Python26\Downloads\psyco-1.6>easy_install psyco
Searching for psyco
Reading http://pypi.python.org/simple/psyco/
Reading http://psyco.sourceforge.net/
Best match: psyco snapshot
Downloading http://wyvern.cs.uni-duesseldorf.de/psyco/psyco-snapshot.tar.gz
error: Can't download http://wyvern.cs.uni-duesseldorf.de/psyco/psyco-snapshot.t
ar.gz: 404 Not Found

所以,我下载了最新版本 1.6 并执行了“python setup.py install”。我已经使用过几次了,没有任何问题。我收到以下消息:

C:\Python26\Downloads\psyco-1.6>python setup.py install
PROCESSOR = 'i386'
running install
running build
running build_py
running build_ext
building 'psyco._psyco' extension
Traceback (most recent call last):
File "setup.py", line 180, in <module>
**kwds )
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\install.py", line 577, in run
self.run_command('build')
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.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:\python26\lib\distutils\command\build_ext.py", line 449, in build_exte
nsions
self.build_extension(ext)
File "C:\python26\lib\distutils\command\build_ext.py", line 499, in build_exte
nsion
depends=ext.depends)
File "C:\python26\lib\distutils\msvc9compiler.py", line 449, in compile
self.initialize()
File "C:\python26\lib\distutils\msvc9compiler.py", line 359, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\python26\lib\distutils\msvc9compiler.py", line 275, in query_vcvarsal
l
raise ValueError(str(list(result.keys())))
ValueError: [u'path']

关于为什么我会收到此错误有什么想法吗?谢谢

最佳答案

psyco 似乎有需要构建的扩展模块。您收到的错误消息不是我所期望的,但它似乎表明它没有找到构建 Python 2.6 扩展模块所需的 Microsoft Visual C++ 编译器(至少比其他编译器更推荐)。

如果您确实想从源代码构建,我建议您下载 Microsoft Visual C++ 2008 Express Edition 或 Microsoft Visual Studio 2008 试用版。

您最好阅读 this thread ,并从社区中已经编译过的人那里下载预编译的二进制文件。

编辑:我刚刚注意到 Psyco home page有一个链接到Python 2.6 pre-compiled binaries by Michael Foord 。这些会更好。

关于python - 在Python中安装Psyco的奇怪错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2720688/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com