python pip软件包安装失败,“修复"后dllwrap错误:“无法找到vcvarsall.bat" [英] python pip package install fails , dllwrap error after 'fixing': "unable to find vcvarsall.bat"

查看:104
本文介绍了python pip软件包安装失败,“修复"后dllwrap错误:“无法找到vcvarsall.bat"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在档案中找不到这个. mingw/msys有什么不对的地方吗? [我需要修复vcvarsall.bat,以便可以安装其他软件包.]

I can't find this in the archives. Is there something not right with mingw/msys? [I need to get vcvarsall.bat fixed, so I can install other packages.]

无法使用pip.exe安装扭曲"的python软件包.

Failure to install python package 'twisted' using pip.exe.

我安装了python2.6和mingw/msys. %PATH%包括C:\MinGW\C:\MinGW\mingw32\bin

I have python2.6 and mingw/msys installed. %PATH% includes C:\MinGW\ and C:\MinGW\mingw32\bin

第一:pip.exe install twisted失败,说出error: Unable to find vcvarsall.bat 我创建文件G:\Programs (x86)\Python 2.6\Lib\distutils\distutils.cfg,其中包含:

first: pip.exe install twisted fails by saying error: Unable to find vcvarsall.bat I create file G:\Programs (x86)\Python 2.6\Lib\distutils\distutils.cfg, which contains:

[build]
compiler=mingw32

现在我得到的错误是:

g:\Programs (x86)\Python 2.6>python Scripts\pip-script.py install twisted
Downloading/unpacking twisted
  Running setup.py egg_info for package twisted
Downloading/unpacking zope.interface (from twisted)
  Running setup.py egg_info for package zope.interface
Requirement already satisfied (use --upgrade to upgrade): setuptools in g:\progr
ams (x86)\python 2.6\lib\site-packages (from zope.interface->twisted)
Installing collected packages: twisted, zope.interface
  Running setup.py install for twisted
    C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall "-Ig:\Programs (x86)\Python
2.6\include" "-Ig:\Programs (x86)\Python 2.6\PC" -c conftest.c -o conftest.o
    conftest.c:1:21: fatal error: rpc/rpc.h: No such file or directory
    compilation terminated.
    C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall "-Ig:\Programs (x86)\Python
2.6\include" "-Ig:\Programs (x86)\Python 2.6\PC" -c conftest.c -o conftest.o
    conftest.c:1:23: fatal error: sys/epoll.h: No such file or directory
    compilation terminated.
    building 'twisted.protocols._c_urlarg' extension
    C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DWIN32=1 "-Ig:\Programs (x8
6)\Python 2.6\include" "-Ig:\Programs (x86)\Python 2.6\PC" -c twisted/protocols/
_c_urlarg.c -o build\temp.win32-2.6\Release\twisted\protocols\_c_urlarg.o
    twisted/protocols/_c_urlarg.c: In function 'unquote':
    twisted/protocols/_c_urlarg.c:41:50: warning: 'tmp' may be used uninitialize
d in this function
    C:\MinGW\bin\dllwrap.exe -mno-cygwin -mdll -static --output-lib build\temp.w
in32-2.6\Release\twisted\protocols\lib_c_urlarg.a --def build\temp.win32-2.6\Rel
ease\twisted\protocols\_c_urlarg.def -s build\temp.win32-2.6\Release\twisted\pro
tocols\_c_urlarg.o "-Lg:\Programs (x86)\Python 2.6\libs" "-Lg:\Programs (x86)\Py
thon 2.6\PCbuild" -lpython26 -lmsvcr90 -o build\lib.win32-2.6\twisted\protocols\
_c_urlarg.pyd
    _c_urlarg.exp: file not recognized: File format not recognized
    collect2: ld returned 1 exit status
    dllwrap: gcc exited with status 1
    error: command 'dllwrap' failed with exit status 1
    Complete output from command "g:\Programs (x86)\Python 2.6\python.exe" -c "i
mport setuptools;__file__='g:\\Programs (x86)\\Python 2.6\\build\\twisted\\setup
.py';execfile(__file__)" install --single-version-externally-managed --record c:
\users\jake\appdata\local\temp\pip-3y_c1e-record\install-record.txt:
    running install

running build

running build_py

running egg_info

writing requirements to Twisted.egg-info\requires.txt

writing Twisted.egg-info\PKG-INFO

writing top-level names to Twisted.egg-info\top_level.txt

writing dependency_links to Twisted.egg-info\dependency_links.txt

reading manifest file 'Twisted.egg-info\SOURCES.txt'

writing manifest file 'Twisted.egg-info\SOURCES.txt'

running build_ext

C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall "-Ig:\Programs (x86)\Python 2.6\
include" "-Ig:\Programs (x86)\Python 2.6\PC" -c conftest.c -o conftest.o

conftest.c:1:21: fatal error: rpc/rpc.h: No such file or directory

compilation terminated.

C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall "-Ig:\Programs (x86)\Python 2.6\
include" "-Ig:\Programs (x86)\Python 2.6\PC" -c conftest.c -o conftest.o

conftest.c:1:23: fatal error: sys/epoll.h: No such file or directory

compilation terminated.

building 'twisted.protocols._c_urlarg' extension

C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DWIN32=1 "-Ig:\Programs (x86)\P
ython 2.6\include" "-Ig:\Programs (x86)\Python 2.6\PC" -c twisted/protocols/_c_u
rlarg.c -o build\temp.win32-2.6\Release\twisted\protocols\_c_urlarg.o

twisted/protocols/_c_urlarg.c: In function 'unquote':

twisted/protocols/_c_urlarg.c:41:50: warning: 'tmp' may be used uninitialized in
 this function

writing build\temp.win32-2.6\Release\twisted\protocols\_c_urlarg.def

C:\MinGW\bin\dllwrap.exe -mno-cygwin -mdll -static --output-lib build\temp.win32
-2.6\Release\twisted\protocols\lib_c_urlarg.a --def build\temp.win32-2.6\Release
\twisted\protocols\_c_urlarg.def -s build\temp.win32-2.6\Release\twisted\protoco
ls\_c_urlarg.o "-Lg:\Programs (x86)\Python 2.6\libs" "-Lg:\Programs (x86)\Python
 2.6\PCbuild" -lpython26 -lmsvcr90 -o build\lib.win32-2.6\twisted\protocols\_c_u
rlarg.pyd

_c_urlarg.exp: file not recognized: File format not recognized

collect2: ld returned 1 exit status

dllwrap: gcc exited with status 1

warning: manifest_maker: standard file '-c' not found

error: command 'dllwrap' failed with exit status 1

----------------------------------------
Command "g:\Programs (x86)\Python 2.6\python.exe" -c "import setuptools;__file__
='g:\\Programs (x86)\\Python 2.6\\build\\twisted\\setup.py';execfile(__file__)"
install --single-version-externally-managed --record c:\users\jake\appdata\local
\temp\pip-3y_c1e-record\install-record.txt failed with error code 1
Storing complete log in C:\Users\jake\AppData\Roaming\pip\pip.log

推荐答案

这可能是Python的错误.参见 http://bugs.python.org/issue2698

This is likely a bug with Python. See http://bugs.python.org/issue2698

与此同时,您可以安装 ActivePython

Meanwhile, you could install ActivePython and install Twisted via PyPM (no compilers needed).

或者,您可以使用官方二进制文件 ...尽管我推荐上述解决方案,因为您将来可以轻松地升级"到较新版本的Twisted.

Alternatively, you can use the official binary ... though I recommend the aforementioned solution as you can easily 'upgrade' to newer versions of Twisted in future.

这篇关于python pip软件包安装失败,“修复"后dllwrap错误:“无法找到vcvarsall.bat"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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