我刚刚在我的Windows 7(64位)联想t61p笔记本电脑上安装了Python 2.6。
正确安装了它们python setup.py install
(在安装过程中至少没有报告错误。)
现在我正在尝试使用easy_install
安装pymongo,但我没有取得多大成功。似乎easy_install
根本不起作用。我以管理员身份执行easy_install
:
C:\>easy_install
Cannot find Python executable C:\Program Files\Python26\python.exe
路径C:\Program Files\Python26\python.exe
正确。
我发现this bug report on bugs.python.org似乎与此有关,但其状态为“已解决”。
您对可能出现的问题有什么想法吗?任何有关进一步诊断问题的提示,提示或技巧都将不胜感激。
编辑:这是我在尝试安装pymongo时收到的堆栈跟踪:
C:\Users\Rune Ibsen\Documents\Downloads\pymongo-1.4>python setup.py install
running install
running bdist_egg
running egg_info
writing pymongo.egg-info\PKG-INFO
writing top-level names to pymongo.egg-info\top_level.txt
writing dependency_links to pymongo.egg-info\dependency_links.txt
reading manifest file 'pymongo.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pymongo.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
building 'pymongo._cbson' extension
Traceback (most recent call last):
File "setup.py", line 166, in <module>
"doc": doc})
File "C:\Program Files\Python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Program Files\Python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "C:\Program Files\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\Program Files\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\command\install.py", line 76, in run
File "C:\Program Files\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\command\install.py", line 96, in do_egg_install
File "C:\Program Files\Python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Program Files\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\Program Files\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\command\bdist_egg.py", line 174, in run
File "C:\Program Files\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\command\bdist_egg.py", line 161, in call_command
File "C:\Program Files\Python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Program Files\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\Program Files\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\command\install_lib.py", line 20, in run
File "C:\Program Files\Python26\lib\distutils\command\install_lib.py", line 113, in build
self.run_command('build_ext')
File "C:\Program Files\Python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Program Files\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "setup.py", line 107, in run
build_ext.run(self)
File "C:\Program Files\Python26\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Program Files\Python26\lib\distutils\command\build_ext.py", line 449, in build_extensions
self.build_extension(ext)
File "setup.py", line 117, in build_extension
build_ext.build_extension(self, ext)
File "C:\Program Files\Python26\lib\distutils\command\build_ext.py", line 499, in build_extension
depends=ext.depends)
File "C:\Program Files\Python26\lib\distutils\msvc9compiler.py", line 448, in compile
self.initialize()
File "C:\Program Files\Python26\lib\distutils\msvc9compiler.py", line 358, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Program Files\Python26\lib\distutils\msvc9compiler.py", line 274, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: [u'path']
C:\Users\Rune Ibsen\Documents\Downloads\pymongo-1.4>
PS:我以前安装了Python 3.1但后来安装了2.6因为我不确定pymongo是否支持3.1。
PPS。:我尝试使用python setup.py install
方法安装pymongo,但这导致了一个令人讨厌的堆栈跟踪,所以我想我会尝试让easy_install为我处理它。
PPPS。:我是Python,easy_install,egg等的新手。
答案 0 :(得分:6)
我对这些特定的包装一无所知,所以我可能没什么帮助。但是对于它的价值,我在使用64位python之前遇到了“找不到python可执行文件”的错误。它发生在我试图安装的软件包没有64位版本,它正在寻找32位python。我最终只是安装和使用32位python。这可能不是问题,但我想我会在那里完成它。
答案 1 :(得分:0)
对easy_install无济于事 - 但是python setup.py install应该可以使用pymongo。什么是堆栈跟踪?
答案 2 :(得分:0)
安装此64位版本的setuptools。