为什么在Windows Vista 64中使用easy_install和Python 2.7安装Pylons 1.0的最后一行出现错误? [英] Why do I get an error on the last line of installing Pylons 1.0 with easy_install and Python 2.7 in Windows Vista 64?

查看:98
本文介绍了为什么在Windows Vista 64中使用easy_install和Python 2.7安装Pylons 1.0的最后一行出现错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在 Windows Vista 64 中使用easy_install命令使用 Python 2.7 安装 Pylons 1.0 ,但收到错误消息:

I tried to install Pylons 1.0 with Python 2.7 using the easy_install command in Windows Vista 64 but got the error:

    raise ValueError(str(list(result.keys())))
ValueError: [u'path']

这是命令提示符下整个安装过程的链接 http://pastie.org/1190341

Here is the link to the whole installation process from command prompt http://pastie.org/1190341

  • 为什么会出现此错误?
  • 我该如何解决?
  • 即使出现此错误,Pylons仍能正常工作吗?

推荐答案

出现错误:

File "C:\Python27\Lib\distutils\msvc9compiler.py", line 295, in q
uery_vcvarsall
    raise ValueError(str(list(result.keys())))
ValueError: [u'path']

distutils查找一个名为vcvarsall.bat的文件.它运行它并获取批处理文件设置的include和lib目录.批处理文件根据您提供给它的平台来设置环境.

distutils looks for a file called vcvarsall.bat. It runs it and gets the include and lib directories that the batch file sets up. The batch file sets up the environment based on what platform you supply to it.

vcvarsall.bat应该位于以下目录中:C:\ Program Files(x86)\ Microsoft Visual Studio 9.0 \ VC

vcvarsall.bat should be in a directory like: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC

创建以下目录:

C:\ Program Files(x86)\ Microsoft Visual Studio 9.0 \ VC \ bin \ amd64 \ C:\ Program Files(x86)\ Microsoft Visual Studio 9.0 \ VC \ bin \ amd64 \ vcvarsamd64.bat

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat

在vcvarsamd64.bat中

in vcvarsamd64.bat

调用"C:\ Program Files \ Microsoft SDKs \ Windows \ v7.1 \ Bin \ SetEnv.cmd"/x64/发布

call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /Release

以上所有这些都设置了Windows工具链以与disutils一起使用.虽然您可能拥有64位python,但是pypi上的大多数软件包都带有32位预编译二进制文件. disutils需要使用编译器工具链来构建64位扩展.这就是所有这些东西出现的地方.

All these above sets up windows tool chain to work with disutils. While you may have 64 bit python, most packages on pypi comes with 32 bit precompiled binaries. disutils needs to use your compiler tool chain for building 64 bit extensions. This is where all this come into picture.

请查看:

vcvarsamd64.bat和其他批处理文件的作用是为libutils,disutils可以使用的工具等设置路径.

What vcvarsamd64.bat and other batchfile does is setup up paths for libs, tools etc which can be used by disutils.

https://serverfault.com/questions/114998 /vista-cmd-shell-thinks-its-windows-server-2008-debug

这篇关于为什么在Windows Vista 64中使用easy_install和Python 2.7安装Pylons 1.0的最后一行出现错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆