* 1. Download the Windows installer from the PIL website.
* 2. Double click on the installer to start the installation process.
* 3. Choose the correct directory for PIL install.
* 4. Finish the installation and test out our sample application locally.
Это инструкции с сайта Google.
но что такое «Выберите правильный каталог для установки PIL». правильный каталог?
находится в питоне lib? в движке приложения Google? или где-то еще?
Я не могу работать с изображениями локально:
мой код:
def upload(input):
items = input['items']
for item in items:
img = images.resize(item['image'], 300, 300)
return img
Я установил PIL в директорию c: \ python, а затем скопировал папку в корень моего проекта. все еще не работает! : S
ошибка, которую я получил:
"D: \ Totty \ webDevelopment \ TottysWorld \ src \ app \ services \ images \ upload.py", строка 11, в загрузке
img = images.resize (item ['image'], 300, 300)
Файл "C: \ GAE \ google \ appengine \ api \ images_ init _. Py", строка 633, в размере.
вернуть image.execute_transforms (output_encoding = output_encoding)
, Файл "C: \ GAE \ google \ appengine \ api \ images_ init _. Py", строка 521, в execute_transforms
ответ)
, Файл "C: \ GAE \ google \ appengine \ api \ apiproxy_stub_map.py", строка 78, в MakeSyncCall
return apiproxy.MakeSyncCall (сервис, вызов, запрос, ответ)
, Файл "C: \ GAE \ google \ appengine \ api \ apiproxy_stub_map.py", строка 278, в MakeSyncCall
rpc.CheckSuccess ()
Файл "C: \ GAE \ google \ appengine \ api \ apiproxy_rpc.py", строка 149, в _WaitImpl
self.request, self.response)
, Файл "C: \ GAE \ google \ appengine \ api \ apiproxy_stub.py", строка 80, в MakeSyncCall
метод (запрос, ответ)
Файл "C: \ GAE \ google \ appengine \ api \ images \ images_stub.py", строка 196, в _Dynamic_Transform
response_value = self._EncodeImage (new_image, request.output ())
Файл "C: \ GAE \ google \ appengine \ api \ images \ images_stub.py", строка 227, в _EncodeImage
image.save (image_string, image_encoding)
Файл "C: \ Python25 \ Lib \ site-packages \ PIL \ Image.py", строка 1439, в сохранении
, Файл "C: \ Python25 \ Lib \ site-packages \ PIL \ PngImagePlugin.py", строка 564, в _save
, SystemError: Родительский модуль 'PIL' не загружен