9

我刚刚在我的 Windows 7(64 位)联想 t61p 笔记本电脑上安装了 Python 2.6。

我已经下载了狮身人面像鼻子,显然使用正确安装了它们

python setup.py install

(至少在安装过程中没有报错)。

现在我正在尝试使用安装pymongo,easy_install我没有取得太大的成功。似乎这easy_install根本不起作用。我easy_install以管理员身份执行:

C:\>easy_install 
Cannot find Python executable C:\Program Files\Python26\python.exe

路径C:\Program Files\Python26\python.exe 正确的。

我在 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.:我曾尝试使用该方法安装 pymongo python setup.py install,但这导致堆栈跟踪看起来很讨厌,所以我想我会尝试让 easy_install 为我处理它。

PPPS.:我对 Python、easy_install、eggs 等完全陌生。

4

3 回答 3

6

我对这些特定的软件包一无所知,所以我可能帮不上什么忙。但是对于它的价值,我在使用 64 位 python 之前遇到了“找不到 python 可执行文件”错误。当我尝试安装的软件包没有 64 位版本并且它正在寻找 32 位 python 时,就会发生这种情况。我最终只是安装和使用了 32 位 python。这可能不是这里的问题,但我想我会解决它。

于 2010-02-24T14:44:03.150 回答
0

对 easy_install 没有多大帮助 - 但 python setup.py install 应该可以与 pymongo 一起使用。堆栈跟踪是什么?

于 2010-02-24T17:31:05.350 回答
0

请安装此 64 位版本的 setuptools。

http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools

于 2011-03-03T02:17:55.483 回答