[p2pu-dev] Error with PIL Image module
Jos Flores
josmasflores at gmail.com
Thu Feb 23 11:11:00 UTC 2012
Hi David,
we all seem to be running into the same problem, so I'm a bit confused
here. There are two pages in the wiki with instructions for Ubuntu
which are slightly different.
Did you install python-imaging as a pre-requisite? and also, how did
you create your lernanta virtualenv, using --no-site-packages? or just
simply: mkvirtualenv lernanta ?
My understanding is that as we are installing imaging as a system
package we cannot use --no-site-packages, but the ideal would be to
create a virtualenv isolated from your system packages (in which case
would you have to install PIL through pip???)
cheers,
José
On 22 February 2012 19:03, David Beckley <beckl.d.413 at isg.edu.sa> wrote:
> Hi,
>
> When I installed Lernanta (following the instructions in the GitHub wiki)
> and ran `make syncdb`, I got this error message:
>
> Unhandled exception in thread started by <bound method Command.inner_run
> of <django.core.management.commands.runserver.Command object at 0x8ad5fcc>>
> Traceback (most recent call last):
> File
> "/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py",
> line 88, in inner_run
> self.validate(display_num_errors=True)
> File
> "/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/core/management/base.py",
> line 249, in validate
> num_errors = get_validation_errors(s, app)
> File
> "/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/core/management/validation.py",
> line 35, in get_validation_errors
> for (app_name, error) in get_app_errors().items():
> File
> "/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/db/models/loading.py",
> line 146, in get_app_errors
> self._populate()
> File
> "/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/db/models/loading.py",
> line 64, in _populate
> self.load_app(app_name)
> File
> "/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/db/models/loading.py",
> line 78, in load_app
> models = import_module('.models', app_name)
> File
> "/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/utils/importlib.py",
> line 35, in import_module
> __import__(name)
> File
> "/home/david/gitRepos/lernanta/lernanta/../lernanta/apps/users/models.py",
> line 22, in <module>
> from drumbeat import storage
> File
> "/home/david/gitRepos/lernanta/lernanta/apps/drumbeat/storage.py", line 2,
> in <module>
> import Image
> ImportError: No module named Image
>
> I updated PIL with the command pip install PIL --upgrade, but the same error
> occurred.
>
> Since the line `import Image` was causing the error, I found a list of all
> the files containing this with grep:
>
> lernanta/apps/drumbeat/storage.py
> lernanta/apps/projects/tasks.py
> lernanta/apps/projects/utils.py
>
> Then, I changed `import Image` to `from PIL import Image` in each of these
> files. `make syncdb` ran perfectly, as well as `python manage.py runserver`.
>
> I am wondering why these changes were necessary. In case it has to do with
> my environment, I am running Python 2.7.1+ on Ubuntu 11.04, following the
> instructions on the GitHub wiki.
>
> Everything seems to be working fine... I'm just nervous that it might blow
> up sooner or later.
>
>
>
>
> _______________________________________________
> p2pu-dev mailing list
> p2pu-dev at lists.p2pu.org
> http://lists.p2pu.org/mailman/listinfo/p2pu-dev
>
More information about the p2pu-dev
mailing list