Question

I'm going to deploy a django app on a shared hosting provider. I installed my own python in my home, it works fine. My promblem comes with the installation of PIL, i have no support for JPEG after the compile process.

I know that the compiler dont find "libjpeg", so i tried to install it at my home, i download the tar.gz and compile it with

./configure -prefix=$HOME/lib
 make
 make install

after i put the path in my.bashrc file.

After all i re-compile PIL and still no have the jpeg support.

It is possible to have the libs installed in a shared hosted enviroment? How would I do this?

Was it helpful?

Solution

Does the machine actually have libjpeg available on it?

Look for /usr/lib/libjpeg.so, and /usr/include/jpeglib.h; they may possibly be in a different lib and include directory. If you can't find them you'll have to also download and compile libjpeg into your home (typically prefix ~/.local).

Then you'll need to add the ‘lib’ path to the ‘library_dirs’ variable and the ‘include’ to ‘include_dirs’ in PIL's setup.py (eg. just under “# add standard directories”), to get it to notice the availability of libjpeg.

OTHER TIPS

I'm not sure where your problem comes from,

you can use PIL without compiling anything! just drop the folder in a place that's in PYTHONPATH, and you're all set.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top