gpt4 book ai didi

python - 错误退出状态 2 尝试在 Windows 7 上的 virtualenv 中使用 pip 安装 PIL

转载 作者:太空狗 更新时间:2023-10-29 21:59:02 24 4
gpt4 key购买 nike

尝试在我的 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,但不确定如何解决我的问题。

谢谢。

最佳答案

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

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

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

关于python - 错误退出状态 2 尝试在 Windows 7 上的 virtualenv 中使用 pip 安装 PIL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5029635/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com