Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/301.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 我无法在Windows XP中编译枕头_Python_Mingw_Pip - Fatal编程技术网

Python 我无法在Windows XP中编译枕头

Python 我无法在Windows XP中编译枕头,python,mingw,pip,Python,Mingw,Pip,我安装了MinGW GCC,将path添加到path变量,在Python安装中的distutils.cfg Lib/distutils文件夹中创建该文件。我尝试使用Pip安装,或者下载源代码并运行python setup.py安装。我试着用virtualenv安装它,并直接安装到系统中。这是Pip的日志: ------------------------------------------------------------ C:\entorno\Scripts\pip-script.p

我安装了MinGW GCC,将path添加到path变量,在Python安装中的distutils.cfg Lib/distutils文件夹中创建该文件。我尝试使用Pip安装,或者下载源代码并运行python setup.py安装。我试着用virtualenv安装它,并直接安装到系统中。这是Pip的日志:

    ------------------------------------------------------------
C:\entorno\Scripts\pip-script.py run on 02/14/13 15:33:32
Downloading/unpacking pillow

  Running setup.py egg_info for package pillow

    running egg_info
    writing pip-egg-info\Pillow.egg-info\PKG-INFO
    writing top-level names to pip-egg-info\Pillow.egg-info\top_level.txt
    writing dependency_links to pip-egg-info\Pillow.egg-info\dependency_links.txt
    C:\Python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'use_2to3'

      warnings.warn(msg)

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


    reading manifest file 'pip-egg-info\Pillow.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files found matching '.hgignore'

    warning: no previously-included files found matching '.hgtags'

    warning: no previously-included files found matching 'BUILDME.bat'

    warning: no previously-included files found matching 'make-manifest.py'

    warning: no previously-included files found matching 'SHIP'

    warning: no previously-included files found matching 'SHIP.bat'

    warning: no previously-included files matching '*' found under directory 'Tests'

    writing manifest file 'pip-egg-info\Pillow.egg-info\SOURCES.txt'
  Source in c:\entorno\build\pillow has version 1.7.8, which satisfies requirement pillow
Installing collected packages: pillow

  Running setup.py install for pillow

    Running command C:\entorno\Scripts\python.exe -c "import setuptools;__file__='C:\\entorno\\build\\pillow\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\docume~1\aaa\config~1\temp\pip-8kdxpq-record\install-record.txt --single-version-externally-managed --install-headers C:\entorno\include\site\python2.7
    running install
    running build
    running build_py
    running build_ext
    building '_imaging' extension

    creating build\temp.win32-2.7
    creating build\temp.win32-2.7\Release
    creating build\temp.win32-2.7\Release\libimaging
    c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\entorno\include -IC:\Python27\include -IC:\entorno\PC -c _imaging.c -o build\temp.win32-2.7\Release\_imaging.o

    c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\entorno\include -IC:\Python27\include -IC:\entorno\PC -c decode.c -o build\temp.win32-2.7\Release\decode.o

    c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\entorno\include -IC:\Python27\include -IC:\entorno\PC -c encode.c -o build\temp.win32-2.7\Release\encode.o

    c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\entorno\include -IC:\Python27\include -IC:\entorno\PC -c map.c -o build\temp.win32-2.7\Release\map.o

    c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\entorno\include -IC:\Python27\include -IC:\entorno\PC -c display.c -o build\temp.win32-2.7\Release\display.o

    In file included from display.c:40:

    libImaging/ImDib.h:38: error: expected specifier-qualifier-list before 'UINT8'

    display.c: In function '_fromstring':

    display.c:186: error: 'struct ImagingDIBInstance' has no member named 'ysize'

    display.c:186: error: 'struct ImagingDIBInstance' has no member named 'linesize'

    display.c:191: error: 'struct ImagingDIBInstance' has no member named 'bits'

    display.c: In function '_tostring':

    display.c:204: error: 'struct ImagingDIBInstance' has no member named 'bits'

    display.c:204: error: 'struct ImagingDIBInstance' has no member named 'ysize'

    display.c:204: error: 'struct ImagingDIBInstance' has no member named 'linesize'

    display.c: In function '_getattr':

    display.c:230: error: 'struct ImagingDIBInstance' has no member named 'mode'

    display.c:232: error: 'struct ImagingDIBInstance' has no member named 'xsize'

    display.c:232: error: 'struct ImagingDIBInstance' has no member named 'ysize'

    display.c: In function 'PyImaging_DrawWmf':

    display.c:761: warning: pointer targets in passing argument 2 of 'SetWinMetaFileBits' differ in signedness

    display.c:767: warning: pointer targets in passing argument 2 of 'SetEnhMetaFileBits' differ in signedness

    display.c:793: warning: passing argument 4 of 'CreateDIBSection' from incompatible pointer type

    C:\Python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'use_2to3'

      warnings.warn(msg)

    error: command 'gcc' failed with exit status 1

    Complete output from command C:\entorno\Scripts\python.exe -c "import setuptools;__file__='C:\\entorno\\build\\pillow\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\docume~1\aaa\config~1\temp\pip-8kdxpq-record\install-record.txt --single-version-externally-managed --install-headers C:\entorno\include\site\python2.7:

    running install

running build

running build_py

running build_ext

building '_imaging' extension

creating build\temp.win32-2.7

creating build\temp.win32-2.7\Release

creating build\temp.win32-2.7\Release\libimaging

c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\entorno\include -IC:\Python27\include -IC:\entorno\PC -c _imaging.c -o build\temp.win32-2.7\Release\_imaging.o

c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\entorno\include -IC:\Python27\include -IC:\entorno\PC -c decode.c -o build\temp.win32-2.7\Release\decode.o

c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\entorno\include -IC:\Python27\include -IC:\entorno\PC -c encode.c -o build\temp.win32-2.7\Release\encode.o

c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\entorno\include -IC:\Python27\include -IC:\entorno\PC -c map.c -o build\temp.win32-2.7\Release\map.o

c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\entorno\include -IC:\Python27\include -IC:\entorno\PC -c display.c -o build\temp.win32-2.7\Release\display.o

In file included from display.c:40:

libImaging/ImDib.h:38: error: expected specifier-qualifier-list before 'UINT8'

display.c: In function '_fromstring':

display.c:186: error: 'struct ImagingDIBInstance' has no member named 'ysize'

display.c:186: error: 'struct ImagingDIBInstance' has no member named 'linesize'

display.c:191: error: 'struct ImagingDIBInstance' has no member named 'bits'

display.c: In function '_tostring':

display.c:204: error: 'struct ImagingDIBInstance' has no member named 'bits'

display.c:204: error: 'struct ImagingDIBInstance' has no member named 'ysize'

display.c:204: error: 'struct ImagingDIBInstance' has no member named 'linesize'

display.c: In function '_getattr':

display.c:230: error: 'struct ImagingDIBInstance' has no member named 'mode'

display.c:232: error: 'struct ImagingDIBInstance' has no member named 'xsize'

display.c:232: error: 'struct ImagingDIBInstance' has no member named 'ysize'

display.c: In function 'PyImaging_DrawWmf':

display.c:761: warning: pointer targets in passing argument 2 of 'SetWinMetaFileBits' differ in signedness

display.c:767: warning: pointer targets in passing argument 2 of 'SetEnhMetaFileBits' differ in signedness

display.c:793: warning: passing argument 4 of 'CreateDIBSection' from incompatible pointer type

C:\Python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'use_2to3'

  warnings.warn(msg)

error: command 'gcc' failed with exit status 1

----------------------------------------

Command C:\entorno\Scripts\python.exe -c "import setuptools;__file__='C:\\entorno\\build\\pillow\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\docume~1\aaa\config~1\temp\pip-8kdxpq-record\install-record.txt --single-version-externally-managed --install-headers C:\entorno\include\site\python2.7 failed with error code 1 in C:\entorno\build\pillow

Exception information:
Traceback (most recent call last):
  File "C:\entorno\lib\site-packages\pip-1.2.1-py2.7.egg\pip\basecommand.py", line 107, in main
    status = self.run(options, args)
  File "C:\entorno\lib\site-packages\pip-1.2.1-py2.7.egg\pip\commands\install.py", line 261, in run
    requirement_set.install(install_options, global_options)
  File "C:\entorno\lib\site-packages\pip-1.2.1-py2.7.egg\pip\req.py", line 1166, in install
    requirement.install(install_options, global_options)
  File "C:\entorno\lib\site-packages\pip-1.2.1-py2.7.egg\pip\req.py", line 589, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "C:\entorno\lib\site-packages\pip-1.2.1-py2.7.egg\pip\util.py", line 612, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command C:\entorno\Scripts\python.exe -c "import setuptools;__file__='C:\\entorno\\build\\pillow\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\docume~1\aaa\config~1\temp\pip-8kdxpq-record\install-record.txt --single-version-externally-managed --install-headers C:\entorno\include\site\python2.7 failed with error code 1 in C:\entorno\build\pillow
这不是我遇到问题的唯一库,但我需要安装这个库

谢谢大家!


PS:这是谷歌翻译,对不起。

当我试图在Windows下安装Pillow时,我遇到了类似的gcc故障,原因显然是setuptools版本过时

:

巨蟒轮 注:实验性。需要设置工具>=0.8和pip>=1.4.1 $pip安装-使用车轮枕


因此,我确保删除了旧版本,pip安装开始完美地工作。

对不起,我没有一个好的答案,但这个线程可能会有所帮助:谢谢,但这个问题迫不及待,我确实重写了我的代码,用不同的思维与PIL一起工作。我认为这是最好的。@Mauriciopanucio:没问题;我不认为有人会等一年才知道答案。我只是想这可能会帮助其他遭受这种痛苦的人:-