Pillow with pypy,未安装 _imagingft C 模块
Pillow with pypy, The _imagingft C module is not installed
Pillow with pypy 在 CentOS 6.8 版上不起作用,
我使用 pip uninstall / install pillow 没问题,
但仍然 "ImportError: The _imagingft C module is not installed",
这是输出:
[root@localhost bin]# ./pip install pillow
Collecting pillow
Requirement already satisfied: olefile in /usr/local/pypy-5.6-linux_x86_64-portable/site-packages (from pillow)
Installing collected packages: pillow
Successfully installed pillow-4.0.0
[root@localhost bin]# ./pypy
Python 2.7.12 (aff251e543859ce4508159dd9f1a82a2f553de00, Nov 12 2016, 08:50:18)
[PyPy 5.6.0 with GCC 6.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> from PIL import Image, ImageDraw, ImageFilter, ImageFont
draw.text((100,100), 'test text', font = font)>>>> im = Image.new('RGB', (300,300), 'white')
>>>> draw = ImageDraw.Draw(im)
>>>> font = ImageFont.truetype('Arial.ttf', 14)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/pypy-5.6-linux_x86_64-portable/site-packages/PIL/ImageFont.py", line 238, in truetype
return FreeTypeFont(font, size, index, encoding)
File "/usr/local/pypy-5.6-linux_x86_64-portable/site-packages/PIL/ImageFont.py", line 127, in __init__
self.font = core.getfont(font, size, index, encoding)
File "/usr/local/pypy-5.6-linux_x86_64-portable/site-packages/PIL/ImageFont.py", line 37, in __getattr__
raise ImportError("The _imagingft C module is not installed")
ImportError: The _imagingft C module is not installed
我使用:pip install pil
[root@localhost bin]# ./pip install PIL
Collecting PIL
Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL
它不起作用
我使用:pip install http://effbot.org/downloads/Imaging-1.1.6.tar.gz
安装没问题,但仍然 "ImportError: No module named _imagingft"
我也下载了 pillow 的源代码 tar,但是没有找到太多的库!
安装的库:
SYSPKGS="$SYSPKGS kernel python python-devel telnet subversion libffi libffi-devel"
SYSPKGS="$SYSPKGS tcl tk ncurses-devel expat-devel bzip2-devel sqlite-devel"
SYSPKGS="$SYSPKGS openssl-devel openssl pcre pcre-devel libxml2-devel libxslt-devel"
SYSPKGS="$SYSPKGS libtiff-devel libjpeg-devel libjpeg-turbo-static freetype-devel"
SYSPKGS="$SYSPKGS zlib zlib-devel zlib-static wget curl net-tools"
yum -y install $SYSPKGS
大多数google的结果是ubuntu,win,macOS,centos6.8的任何解决方案?
求助! :(
Pillow 的 4.0.0 不能与 PyPy 一起使用:我必须先修复 PyPy 中的 distutils,然后才能安装它。通过此修复,您的示例可以正常工作。
您可以通过向 PyPy 发行版中的文件 lib-python/2.7/distutils/unixccompiler.py
添加几行来手动安装修复程序:请参阅 https://bitbucket.org/pypy/pypy/commits/66ef3eb6a91e 。它也将包含在下一个 PyPy 版本中。
Pillow with pypy 在 CentOS 6.8 版上不起作用, 我使用 pip uninstall / install pillow 没问题, 但仍然 "ImportError: The _imagingft C module is not installed", 这是输出:
[root@localhost bin]# ./pip install pillow
Collecting pillow
Requirement already satisfied: olefile in /usr/local/pypy-5.6-linux_x86_64-portable/site-packages (from pillow)
Installing collected packages: pillow
Successfully installed pillow-4.0.0
[root@localhost bin]# ./pypy
Python 2.7.12 (aff251e543859ce4508159dd9f1a82a2f553de00, Nov 12 2016, 08:50:18)
[PyPy 5.6.0 with GCC 6.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> from PIL import Image, ImageDraw, ImageFilter, ImageFont
draw.text((100,100), 'test text', font = font)>>>> im = Image.new('RGB', (300,300), 'white')
>>>> draw = ImageDraw.Draw(im)
>>>> font = ImageFont.truetype('Arial.ttf', 14)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/pypy-5.6-linux_x86_64-portable/site-packages/PIL/ImageFont.py", line 238, in truetype
return FreeTypeFont(font, size, index, encoding)
File "/usr/local/pypy-5.6-linux_x86_64-portable/site-packages/PIL/ImageFont.py", line 127, in __init__
self.font = core.getfont(font, size, index, encoding)
File "/usr/local/pypy-5.6-linux_x86_64-portable/site-packages/PIL/ImageFont.py", line 37, in __getattr__
raise ImportError("The _imagingft C module is not installed")
ImportError: The _imagingft C module is not installed
我使用:pip install pil
[root@localhost bin]# ./pip install PIL
Collecting PIL
Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL
它不起作用
我使用:pip install http://effbot.org/downloads/Imaging-1.1.6.tar.gz
安装没问题,但仍然 "ImportError: No module named _imagingft"
我也下载了 pillow 的源代码 tar,但是没有找到太多的库! 安装的库:
SYSPKGS="$SYSPKGS kernel python python-devel telnet subversion libffi libffi-devel"
SYSPKGS="$SYSPKGS tcl tk ncurses-devel expat-devel bzip2-devel sqlite-devel"
SYSPKGS="$SYSPKGS openssl-devel openssl pcre pcre-devel libxml2-devel libxslt-devel"
SYSPKGS="$SYSPKGS libtiff-devel libjpeg-devel libjpeg-turbo-static freetype-devel"
SYSPKGS="$SYSPKGS zlib zlib-devel zlib-static wget curl net-tools"
yum -y install $SYSPKGS
大多数google的结果是ubuntu,win,macOS,centos6.8的任何解决方案?
求助! :(
Pillow 的 4.0.0 不能与 PyPy 一起使用:我必须先修复 PyPy 中的 distutils,然后才能安装它。通过此修复,您的示例可以正常工作。
您可以通过向 PyPy 发行版中的文件 lib-python/2.7/distutils/unixccompiler.py
添加几行来手动安装修复程序:请参阅 https://bitbucket.org/pypy/pypy/commits/66ef3eb6a91e 。它也将包含在下一个 PyPy 版本中。