【问题标题】:Error exit status 2 trying to install PIL with pip in virtualenv on windows 7错误退出状态 2 尝试在 windows 7 上的 virtualenv 中使用 pip 安装 PIL
【发布时间】:2011-02-17 13:35:42
【问题描述】:

尝试在我的 virtualenv 中通过 pip 安装 PIL。但是我得到了这个错误。

C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IlibImaging -Ic:\My_Pro
jects\testenv\include -Ic:\My_Projects\testenv\PC /Tc_imaging.c /Fobuild\temp.win32-2.7\Release\_imaging.obj

_imaging.c

_imaging.c(75) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directory

error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2

----------------------------------------
Command c:\My_Projects\testenv\Scripts\python.exe -c "import setuptools;__file__='C:\\My_Projects\\testenv\\pinax-solcia
l-site\\build\\PIL\\setup.py';execfile(__file__)" install --single-version-externally-managed --record c:\users\darren\a
ppdata\local\temp\pip-fdzgwn-record\install-record.txt failed with error code 1
Storing complete log in C:\Users\Darren\AppData\Roaming\pip\pip.log

我查看了这个question,它建议安装 python-dev 但该用户在 Ubuntu 上。我使用的是 WINdows 7,但不知道如何解决我的问题。

谢谢。

【问题讨论】:

    标签: python python-imaging-library virtualenv pip


    【解决方案1】:

    VisualStudio 编译器似乎没有找到 Python 开发源。 也许您需要设置特定的环境变量?

    This blog post 似乎建议您需要将c:\Python27c:\Python27\bin 添加到您的路径中。也许这就是缺少的东西?

    PIL 也因与 setuptools 存在问题而闻名。你试过pillow吗?

    【讨论】:

      猜你喜欢
      • 2012-10-23
      • 2011-02-27
      • 2018-10-14
      • 1970-01-01
      • 2023-04-10
      • 1970-01-01
      • 1970-01-01
      • 2012-12-22
      • 1970-01-01
      相关资源
      最近更新 更多