The _imaging C module is not installed
来源:互联网 发布:地图标识软件 编辑:程序博客网 时间:2024/05/22 06:13
最近刚学python时,遇到一个截屏功能时,用到PIL模块,可是安装该模块之后遇到问题“The _imaging C module is not installed”,找到解决方法,特此做个记录。
虽然以下前几点不是我遇到的问题但是为了解决问题的完整性,特此补充说明。
PIL库文件包含两个主要部分:一部分是一些Python模块,通常在一个PIL子目录中,还有一个二进制扩展模块 _imaging。对于不同的平台和版本,_imaging被存放在一个叫
_imaging.pyd,_imaging.dll,或者_imaging.so的文件中。
如果导入_imaging模块失败,PIL的部分功能任然可以使用,但是如果你用到了一些需要使用扩展功能的_imaging的功能的方法时,PIL就会引起ImportError
一下是你需要检查的:
1.你是否有_imaging模块。
在windows平台下看看有没有_imaging.pyd文件(有些情况为_imaging.dll),我的目录为C:\Python27\Lib\site-packages\PIL,在Unix下找个叫_imaging.so 或者_imagingmodule.so
的文件,有些Unix的平台的扩展名可能为.sl。
2.python是否能找到_imaging模块
当python需要_imaging模块时会搜寻python模块的目录,如果不能在该目录下找到的话,加载便会失败
以下方法用于检查目录:
打开命令提示符输入python -v ,再输入import Image
另外一种方法是import sys,然后print sys.path
3.如果到此都行,在交互模式下输入import _imaging还提示有错误可能就是版本的问题。
我到此还有问题,但是感觉自己版本没什么问题,后来是通过该网站http://www.pythonware.com/products/pil/找到的版本重新安装了一下就搞定了,也不知道是不是32位与64位的问题。
此外如果上面有叙述不当的可以查看一下FAQhttp://www.pythonware.com/products/pil/faq.htm
- The _imaging C module is not installed
- The _imaging C module is not installed
- The _imaging C module is not installed 转载
- PIL The _imaging C module is not installed
- The _imaging C module is not installed ---mark
- PIL报错:The _imaging C module is not installed
- python__The _imaging C module is not installed
- ImportError: The _imaging C module is not installed错误解决记录
- 解决PIL “decoder jpeg not available” 和 “ImportError: The _imaging C module is not installed”的问题
- The _imagingft C module is not installed
- python PIL ImportError: The _imagingft C module is not installed
- ImportError: The _imagingft C module is not installed
- ImportError: The _imagingft C module is not installed
- PIL “The _imagingft C module is not installed” 错误补救
- ImportError: The _imagingft C module is not installed
- ImportError: The _imagingft C module is not installed
- ImportError:The _imagingft C module is not installed 错误的解决方法
- python中PIL库在使用时出现The _imagingft C module is not installed错误
- mysql api for C详细介绍
- Oracle AIM
- url去重
- Android--用SAX解析xml文件
- HDOJ 1425 : Sort
- The _imaging C module is not installed
- 修改Oracle 11g 内存
- Leetcode 75 Sort Colors
- iphone监控客户端ffmpeg解码成功,使用uiimage贴图没显示
- Win7 下支持多次双击打开dsw文件 及 修改dsw图标
- 三维显示软件制作--概述
- 基于cocos2d-x引擎的游戏框架设计
- 关于Objective-c内存管理的一些笔记
- Oracle归档模式与非归档模式设置