错误:在 windows7 中安装 PIL 时找不到 vcvarsall.bat [重复]

Posted

技术标签:

【中文标题】错误:在 windows7 中安装 PIL 时找不到 vcvarsall.bat [重复]【英文标题】:error: Unable to find vcvarsall.bat in installing PIL in windows7 [duplicate] 【发布时间】:2014-01-31 05:39:30 【问题描述】:

我使用 Windows 7 开发 Django 1.3.7。现在我正在尝试使用 pip 在我的 djangp 上安装 PIL,但出现错误。

C:\Django-Proj\myproj\myproj>pip install PIL==1.1.7
Downloading/unpacking PIL==1.1.7
  Could not find any downloads that satisfy the requirement PIL==1.1.7
  Some externally hosted files were ignored (use --allow-external PIL to allow).

Cleaning up...
No distributions at all found for PIL==1.1.7
Storing debug log for failure in C:\Users\Samuel\pip\pip.log

现在我正在通过下载http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz 尝试这种方法,但我也遇到了错误

C:\pyset\Imaging-1.1.7\Imaging-1.1.7>python setup.py install
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
copying PIL\ArgImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\BdfFontFile.py -> build\lib.win-amd64-2.7
copying PIL\BmpImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\BufrStubImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\ContainerIO.py -> build\lib.win-amd64-2.7
copying PIL\CurImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\DcxImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\EpsImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\ExifTags.py -> build\lib.win-amd64-2.7
copying PIL\FitsStubImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\FliImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\FontFile.py -> build\lib.win-amd64-2.7
copying PIL\FpxImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\GbrImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\GdImageFile.py -> build\lib.win-amd64-2.7
copying PIL\GifImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\GimpGradientFile.py -> build\lib.win-amd64-2.7
copying PIL\GimpPaletteFile.py -> build\lib.win-amd64-2.7
copying PIL\GribStubImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\Hdf5StubImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\IcnsImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\IcoImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\Image.py -> build\lib.win-amd64-2.7
copying PIL\ImageChops.py -> build\lib.win-amd64-2.7
copying PIL\ImageCms.py -> build\lib.win-amd64-2.7
copying PIL\ImageColor.py -> build\lib.win-amd64-2.7
copying PIL\ImageDraw.py -> build\lib.win-amd64-2.7
copying PIL\ImageDraw2.py -> build\lib.win-amd64-2.7
copying PIL\ImageEnhance.py -> build\lib.win-amd64-2.7
copying PIL\ImageFile.py -> build\lib.win-amd64-2.7
copying PIL\ImageFileIO.py -> build\lib.win-amd64-2.7
copying PIL\ImageFilter.py -> build\lib.win-amd64-2.7
copying PIL\ImageFont.py -> build\lib.win-amd64-2.7
copying PIL\ImageGL.py -> build\lib.win-amd64-2.7
copying PIL\ImageGrab.py -> build\lib.win-amd64-2.7
copying PIL\ImageMath.py -> build\lib.win-amd64-2.7
copying PIL\ImageMode.py -> build\lib.win-amd64-2.7
copying PIL\ImageOps.py -> build\lib.win-amd64-2.7
copying PIL\ImagePalette.py -> build\lib.win-amd64-2.7
copying PIL\ImagePath.py -> build\lib.win-amd64-2.7
copying PIL\ImageQt.py -> build\lib.win-amd64-2.7
copying PIL\ImageSequence.py -> build\lib.win-amd64-2.7
copying PIL\ImageShow.py -> build\lib.win-amd64-2.7
copying PIL\ImageStat.py -> build\lib.win-amd64-2.7
copying PIL\ImageTk.py -> build\lib.win-amd64-2.7
copying PIL\ImageTransform.py -> build\lib.win-amd64-2.7
copying PIL\ImageWin.py -> build\lib.win-amd64-2.7
copying PIL\ImImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\ImtImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\IptcImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\JpegImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\McIdasImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\MicImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\MpegImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\MspImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\OleFileIO.py -> build\lib.win-amd64-2.7
copying PIL\PaletteFile.py -> build\lib.win-amd64-2.7
copying PIL\PalmImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\PcdImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\PcfFontFile.py -> build\lib.win-amd64-2.7
copying PIL\PcxImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\PdfImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\PixarImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\PngImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\PpmImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\PsdImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\PSDraw.py -> build\lib.win-amd64-2.7
copying PIL\SgiImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\SpiderImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\SunImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\TarIO.py -> build\lib.win-amd64-2.7
copying PIL\TgaImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\TiffImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\TiffTags.py -> build\lib.win-amd64-2.7
copying PIL\WalImageFile.py -> build\lib.win-amd64-2.7
copying PIL\WmfImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\XbmImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\XpmImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\XVThumbImagePlugin.py -> build\lib.win-amd64-2.7
copying PIL\__init__.py -> build\lib.win-amd64-2.7
running build_ext
building '_imaging' extension
error: Unable to find vcvarsall.bat

有人对此有想法吗?提前 tnx

【问题讨论】:

【参考方案1】:

在 Windows 上,您需要 PIL 的预编译版本,除非您安装了 VisualC 工具包 - 尝试使用 here 进行非官方构建。

【讨论】:

以上是关于错误:在 windows7 中安装 PIL 时找不到 vcvarsall.bat [重复]的主要内容,如果未能解决你的问题,请参考以下文章

“错误:在 react-redux 项目中安装节点包时找不到模块'internal/util/types'”

typescript/raven.d.ts,行:205 在离子中安装 npm 时找不到名称“未知”

如何在pycharm中安装PIL模块

如何在pycharm中安装PIL模块

/usr/bin/ld: 在 R 中安装“RcppArmadillo”时找不到 -lgfortran

在沙箱中安装了 parsec,但在 ghci 中尝试加载文件时找不到库