Добрый день. Мне потребовалось, чтобы потон рисовал картинки в определённых местах. Для этого был выбран модуль PIL и pillow.
qnap порезали систему linux поэтому мне пришлось побороться с ней, чтобы установил pil (ушла неделя т.к. Я о linux не чего не знаю). После установки Я обрадовался, попробовал написать простейшую программу, которая рисует круг красного цвета и без вопросов записывает его в файл
from PIL import Image, ImageDraw
image = Image.new("RGBA", (320,320), (0,0,0,0))
draw = ImageDraw.Draw(image)
draw.ellipse((10,10,300,300), fill="red", outline="red")
del draw
image.save("test.png", "PNG")
на виндовс такой же текст работает без проблем но здесь выдал ошибку
$ python pil2.py
Traceback (most recent call last): File "pil2.py", line 6, in <module>
image.save("test.png", "PNG") File "build/bdist.linux-x86_64/egg/PIL/Image.py", line 1685, in save
def __init__(self, im, box):
File "build/bdist.linux-x86_64/egg/PIL/PngImagePlugin.py", line 706, in _save
File "build/bdist.linux-x86_64/egg/PIL/ImageFile.py", line 473, in _save
# FIXME: make MAXBLOCK a configuration parameter
File "build/bdist.linux-x86_64/egg/PIL/Image.py", line 432, in _getencoder
# --------------------------------------------------------------------
IOError: encoder zip not available
Подскажите в чём проблема. Я устал биться с этой системой проще уже взять ноут без монитора и установить в него чистый linux или подобную систему.
PS
для установки pil мне пришлось установить gcc и затем командами
$ python setup.py build
$ python setup.py install
устанавливать. Так же установил easy_install, pip
при установки писал
warning: no files found matching '*.yaml'
warning: no files found matching '*.bdf' under directory 'Images'
warning: no files found matching '*.fli' under directory 'Images'
warning: no files found matching '*.gif' under directory 'Images'
warning: no files found matching '*.icns' under directory 'Images'
warning: no files found matching '*.ico' under directory 'Images'
warning: no files found matching '*.jpg' under directory 'Images'
warning: no files found matching '*.pbm' under directory 'Images'
warning: no files found matching '*.pil' under directory 'Images'
warning: no files found matching '*.png' under directory 'Images'
warning: no files found matching '*.ppm' under directory 'Images'
warning: no files found matching '*.psd' under directory 'Images'
warning: no files found matching '*.tar' under directory 'Images'
warning: no files found matching '*.webp' under directory 'Images'
warning: no files found matching '*.xpm' under directory 'Images'
warning: no files found matching 'README' under directory 'Sane'
warning: no files found matching 'README' under directory 'Scripts'
warning: no files found matching '*.icm' under directory 'Tests'
warning: no files found matching '*.txt' under directory 'Tk'
может из за этого?