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

时间:2022-11-16 09:33:36

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

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

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:

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

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

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

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

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

我在bugs.python.org上找到了这个bug报告,它看起来是相关的,虽然它的状态是“解决了”。

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:

编辑:这是我在安装pymongo时收到的stacktrace:

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.

PS.:我之前安装了Python 3.1,但是后来安装了2.6,因为我不确定pymongo是否支持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.

pp。:我尝试过使用python设置安装pymongo。py安装方法,但是这导致了一个看起来很糟糕的堆栈跟踪,所以我想让easy_install替我处理它。

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

公私合伙制。:我对Python、easy_install、egg等都是全新的。

3 个解决方案

#1


6  

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.

我对这些特殊的包裹一无所知,所以我可能帮不上什么忙。但值得注意的是,我在使用64位python之前遇到过“无法找到python可执行文件”错误。当我试图安装的包没有64位版本时,它正在寻找32位的python。最后,我只是安装并使用了32位python。这可能不是这里的问题,但我想我已经解决了。

#2


0  

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

对于easy_install来说帮助不大,但是python的安装。py安装应该在w/ pymongo上工作。堆栈跟踪是什么?

#3


0  

Install this 64-bit version of setuptools instead.

安装这个64位版本的setuptools。

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

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

#1


6  

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.

我对这些特殊的包裹一无所知,所以我可能帮不上什么忙。但值得注意的是,我在使用64位python之前遇到过“无法找到python可执行文件”错误。当我试图安装的包没有64位版本时,它正在寻找32位的python。最后,我只是安装并使用了32位python。这可能不是这里的问题,但我想我已经解决了。

#2


0  

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

对于easy_install来说帮助不大,但是python的安装。py安装应该在w/ pymongo上工作。堆栈跟踪是什么?

#3


0  

Install this 64-bit version of setuptools instead.

安装这个64位版本的setuptools。

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

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