'python PIL install on shared hosting
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?
Solution 1:[1]
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.
Solution 2:[2]
Pillow v8 works well on shared hosting cpanel by this current time, python 3.7 pillow==8.0.0
Solution 3:[3]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | bobince |
Solution 2 | Live Software Developer |
Solution 3 | hasen |