在 Windows 7 64 位上使用 easy_install 时出现问题。 (找不到python.exe)

发布于 2024-08-23 09:34:27 字数 4581 浏览 11 评论 0原文

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

我已经下载了 Sphinxnose 并且显然使用正确安装了它们

python setup.py install

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

现在我尝试使用 easy_installpymongo > 但我并没有取得太大成功。似乎 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.:我尝试使用 python setup.py install 方法安装 pymongo,但这导致了令人讨厌的堆栈跟踪,所以我想我应该尝试让 easy_install 帮我处理它。

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

I have just now installed Python 2.6 on my Windows 7 (64 bit) Lenovo t61p laptop.

I have downloaded Sphinx and nose and apparently installed them correctly using

python setup.py install

(at least no errors were reported during the installation).

Now I am trying to install pymongo using easy_install but I am not having much success. It seems that easy_install isn't working at all. I execute easy_install as administrator:

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

The path C:\Program Files\Python26\python.exe is correct.

I have found this bug report on bugs.python.org which seems to be related, although its status is 'Resolved'.

Do you have any ideas as to what may be wrong? Any pointers, hints or tips for diagnosing the problem further would be greatly appreciated.

EDIT: This is the stacktrace I receive when trying to install 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.: I previously installed Python 3.1 but later installed 2.6 because I am not sure whether pymongo supports 3.1.

PPS.: I have tried installing pymongo using the python setup.py install approach, but this resulted in a nasty-looking stack trace, so I thought I would try to let easy_install take care of it for me.

PPPS.: I am completely new to Python, easy_install, eggs etc.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

寒尘 2024-08-30 09:34:27

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

I don't know anything about these specific packages so I may not be much help. But for what it's worth I have run into the "can't find python executable" errors before with 64 bit python. It happened when the package I was trying to install didn't have a 64 bit version and it was looking for 32 bit python. I ended up just installing and using the 32 bit python. That may not be the issue here, but I figured I'd through it out there.

弥枳 2024-08-30 09:34:27

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

can't help much with easy_install - but python setup.py install should work w/ pymongo. what was the stack trace?

动次打次papapa 2024-08-30 09:34:27

请安装此 64 位版本的 setuptools。

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

Install this 64-bit version of setuptools instead.

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文