在这个网站上有6个版本,分别为Pillow-3.1.0-cp27-none-win32.whl、Pillow-3.1.0-cp27-none-win_amd64.whl、Pillow-3.1.0-cp34-none-win32.whl、Pillow-3.1.0-cp34-none-win_amd64.whl、Pillow-3.1.0-cp35-none-win32.whl和Pillow-3.1.0-cp35-none-win_amd64.whl。
这里可以通过pip install pillow安装PIL 的替代模块pillow
pytesser 模块的安装:
安装Pytesser比较麻烦一点,因为Pytesser只在2007更新过Windows的版本,所以用pip无法安装,我们要去到Pytesser的官网进行下载(如果没有翻墙的工具可以去资源进行搜索,反正版本都为0.0.1) 下载好后进行解压,然后将压缩包里面的所有内容(如果有的话注意尽量不将压缩软件自动创建的文件夹整个复制进pytesser)复制到Python27\Lib\site-packges\pytesser下,若没有pytesser文件夹则自己新建。具体步骤如下:
1、在 “D:\Python27\Lib\site-packages” 路径(注意我的python安装包放在D:\Python27中)下新建一个文件夹,命名 “pytesser” 。把 “pytesser_v0.0.1.zip” 里的文件解压到该目录: 2、将 “pytesser.py” 改名为 “__init__.py”。 3、打开 “__init__.py” 文件,将 “tesseract_exe_name” 变量的值改为 'D:\\Python27\\Lib\\site-packges\\pytesser\\tesseract'(原值为 ‘tesseract‘,注意我的python安装包放在D:\Python27中, 注意用双斜杠,否则可能因为转义字符报错)。 4、pytesser 模块依赖于 PIL 模块,如果是按照上面的方法安装 PIL 的话,需要把 “init.py” 文件里的 “import Image” 改成 “from PIL import Image” 。
pytesser 模块的安装:
如果程序中要使用Image, ImageDraw, ImageEnhance, ImageFilter等需要在文件开头将import ImageI [, ImageDraw, ImageEnhance, ImageFilter]改为
from PIL import Image from PIL import ImageDraw from PIL import ImageEnhance from PIL import ImageFilter 等