Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Django c _imaging module not installed [RSS Feed]

#1 June 22, 2010 09:42:56

a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django c _imaging module not installed


Hi there.

For the last week or so I have been having real issues with getting
Django / python and libjpeg to play nice.
However successfully followed loads of threads and comments and got my
own solution.

Secondly I have applied this solution so that it works successfully on
my production server.

Question I have though is why does it still not pick up the _imaging
module.

Here are the steps I took.

I already had jpeg-7 and Imaging-1.1.7 on my server.

I removed /opt/python2.6/lib/python2.6/site-packages/PIL and the
PIL.pth file

I deleted Imaging-1.1.7 and replaced it with 1.1.6 (as this is
supposedly more stable)

I then cd'd into my src directory where all my source files are.

in jpeg-7 i ran the following statements.

sudo make clean (this removed all previuses build and all references
to *jpeg*)
sudo ./configure --enable-shared --enable-static
sudo make
sudo make install

then cd'd into my Imaging-1.1.6 directory and ran the following

sudo rm -Rf build (to remove any previous builds)
sudo python setup.py build
sudo python setup.py install
sudo python selftest.py (57 test passed) no errors.

then i go into my directory where my django app lives and I execute
the following

python manage.py shell
import Image (no errors)
import PIL (no errors)
import _imaging (no errors)
i = Image.open("/path/to/my/image.jpeg")
i.save("/path/to/my/new_image.jpeg")

works without any errors.

However... running the admin through django still causes me "c
_imaging module not installed"

Any help would be greatly appreciated.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 June 22, 2010 10:40:01

e.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django c _imaging module not installed


Are you doing some image related work in Django admin?

We have had lots of trouble with libjpeg and PIL. We use PIL 1.1.6 and
libjpeg 6. Our install process requires using apt to install the
libjpeg62-dev package before installing PIL 1.1.6.

If you're using a Debian based OS, I'd remove your custom compiled
libjpeg and then install the above package via apt and then try again.

Are you installing PIL system-wide with easy_install or is it in a
virtualenv?

Euan

On Jun 22, 9:42 am, appel268576 <appel268...@gmail.com> wrote:
> Hi there.
>
> For the last week or so I have been having real issues with getting
> Django / python and libjpeg to play nice.
> However successfully followed loads of threads and comments and got my
> own solution.
>
> Secondly I have applied this solution so that it works successfully on
> my production server.
>
> Question I have though is why does it still not pick up the _imaging
> module.
>
> Here are the steps I took.
>
> I already had jpeg-7 and Imaging-1.1.7 on my server.
>
> I removed /opt/python2.6/lib/python2.6/site-packages/PIL and the
> PIL.pth file
>
> I deleted Imaging-1.1.7 and replaced it with 1.1.6 (as this is
> supposedly more stable)
>
> I then cd'd into my src directory where all my source files are.
>
> in jpeg-7 i ran the following statements.
>
>   sudo make clean (this removed all previuses build and all references
> to *jpeg*)
>   sudo ./configure --enable-shared --enable-static
>   sudo make
>   sudo make install
>
> then cd'd into my Imaging-1.1.6 directory and ran the following
>
>   sudo rm -Rf build (to remove any previous builds)
>   sudo python setup.py build
>   sudo python setup.py install
>   sudo python selftest.py (57 test passed) no errors.
>
> then i go into my directory where my django app lives and I execute
> the following
>
>   python manage.py shell
>   import Image (no errors)
>   import PIL (no errors)
>   import _imaging (no errors)
>   i = Image.open("/path/to/my/image.jpeg")
>   i.save("/path/to/my/new_image.jpeg")
>
> works without any errors.
>
> However... running the admin through django still causes me "c
> _imaging module not installed"
>
> Any help would be greatly appreciated.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Django c _imaging module not installed [RSS Feed]

Board footer

Moderator control

Enjoy the 13th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support