django.models problem

124 views
Skip to first unread message

Shangui Ren

unread,
Sep 7, 2014, 4:41:35 AM9/7/14
to django...@googlegroups.com
os:win7 64bit
database:mysql

I use django mdoels to create imagefield field in a table,but when i use "python manage.py sqlall books" command it print the fllowing error:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
399, in execute_from_command_line
    utility.execute()
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python27\lib\site-packages\django\core\management\base.py", line 242,
 in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\Python27\lib\site-packages\django\core\management\base.py", line 284,
 in execute
    self.validate()
  File "C:\Python27\lib\site-packages\django\core\management\base.py", line 310,
 in validate
    num_errors = get_validation_errors(s, app)
  File "C:\Python27\lib\site-packages\django\core\management\validation.py", lin
e 113, in get_validation_errors
    from django.utils.image import Image
  File "C:\Python27\lib\site-packages\django\utils\image.py", line 154, in <modu
le>
    Image, _imaging, ImageFile = _detect_image_library()
  File "C:\Python27\lib\site-packages\django\utils\image.py", line 108, in _dete
ct_image_library
    _("Neither Pillow nor PIL could be imported: %s") % err
django.core.exceptions.ImproperlyConfigured: Neither Pillow nor PIL could be imp
orted: No module named Image

youngershen

unread,
Sep 7, 2014, 9:24:19 AM9/7/14
to django...@googlegroups.com
easy_install PIL may be solve your problem
--
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/592ad0ea-47ed-4f8f-9514-5295d4e01238%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Martin Spasov

unread,
Sep 7, 2014, 11:48:58 AM9/7/14
to django...@googlegroups.com
or easy_install pip
and then pip install pillow

why use pip instead of easy_install can be seen here

Martin!
Reply all
Reply to author
Forward
0 new messages