django-facebook

798 views
Skip to first unread message

Duncan Bates

unread,
Dec 17, 2013, 1:05:08 PM12/17/13
to django...@googlegroups.com
Testing django for my next web app, but encountering image library problems when I've added the django-facebook to my project; ImproperlyConfigured: Neither Pillow nor PIL could be imported: No module named Image

Using python v2.7 win64 / Django 1.6, and Microsoft Python Tools for Visual Studio v2.0.11016.00

Tried to install PIL and Pillow through pip, both fails.

Ideas?

Vibhu Rishi

unread,
Dec 17, 2013, 1:25:37 PM12/17/13
to django...@googlegroups.com
I installed Pillow a few days back - it went fine.

$pip install Pillow

You need to make sure that you have libraries for png/jpg available. I am not sure if that has to be a pip or a sudo apt-get ( i went the apt-get way )

V.



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/be25e45b-d428-4e37-85f1-3129d6d0551a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

Hajime Branko Yamasaki Vukelic

unread,
Dec 17, 2013, 5:31:15 PM12/17/13
to django...@googlegroups.com
Duncan, 

Try installing pillow using easy_install instead of pip. That worked for me.

HTH

Mike Dewhirst

unread,
Dec 17, 2013, 10:40:10 PM12/17/13
to django...@googlegroups.com
On 18/12/2013 12:05am, Duncan Bates wrote:
> Testing django for my next web app, but encountering image library
> problems when I've added the django-facebook to my project;
> ImproperlyConfigured: Neither Pillow nor PIL could be imported: No
> module named Image

I installed pre-compiled Pillow from ...

http://www.lfd.uci.edu/~gohlke/pythonlibs/

... which works well for me.

>
> Using python v2.7 win64 / Django 1.6, and Microsoft Python Tools for
> Visual Studio v2.0.11016.00
>
> Tried to install PIL and Pillow through pip, both fails.
>
> Ideas?
>

Michał Pasternak

unread,
Dec 19, 2013, 9:26:03 AM12/19/13
to django...@googlegroups.com
How about a log with the failure from the installation and some basic information on your platform and operating system? 

Hajime Branko Yamasaki Vukelic

unread,
Dec 19, 2013, 2:25:58 PM12/19/13
to django...@googlegroups.com
On Thu, Dec 19, 2013 at 10:26 AM, Michał Pasternak <micha...@gmail.com> wrote:
> How about a log with the failure from the installation and some basic
> information on your platform and operating system?

Information about the platform is listed in the original post:

> Using python v2.7 win64 / Django 1.6, and Microsoft Python Tools for Visual Studio v2.0.11016.00

AFAIK, This is a known issue on Windows. Pillow ships binary package
for Windows which is not installed by pip. Installing using
easy_install should do the trick for the time being. I believe a fix
is in the pipeline, but can't find the details. It's somewhere in the
pip's issue tracker, I think.

Alternatively, PIL can also be installed using .exe file[1], but it's
deprecated by Django project, so I think installing pillow is better.

[1] http://www.pythonware.com/products/pil/


--
Branko
bra...@brankovukelic.com

/dev/blog: brankovukelic.com

Duncan Bates

unread,
Dec 20, 2013, 8:51:49 AM12/20/13
to django...@googlegroups.com
ended up doing easy_install from the command line in both the python environment and pyton/Script base dir.

Installed c:\ttribe\trunk\tribe\workpc27\lib\site-packages\pillow-2.2.2-py2.7-win32.egg
Processing dependencies for Pillow
Finished processing dependencies for Pillow

C:\ttribe\trunk\tribe\workpc27\Scripts>

running my dajngo app from Visual studio, still complains about Pillow/PIL

  File "C:\Temp\DFB\DFB\env\lib\site-packages\django\core\management\validation.
py", line 113, in get_validation_errors
    from django.utils.image import Image
  File "C:\Temp\DFB\DFB\env\lib\site-packages\django\utils\image.py", line 154,
in <module>
    Image, _imaging, ImageFile = _detect_image_library()
  File "C:\Temp\DFB\DFB\env\lib\site-packages\django\utils\image.py", line 108,
in _detect_image_library
    _("Neither Pillow nor PIL could be imported: %s") % err
ImproperlyConfigured: Neither Pillow nor PIL could be imported: No module named
Image
Press any key to continue . . .
Reply all
Reply to author
Forward
0 new messages