Something that probably shouldn't be causing me so many problems, is.
I'm trying to install PIL on my Ubuntu server. It's installing fine. However every time I try and update the database to add the image field I get the following error:
Error: One or more models did not validate: product.product: "image": To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .
I've just realised I have been logged in as my user. Do i need to be logged in as root to install it? I'm doing this on a VPS not a local machine.
I've tried loads of tutorials on the web and not getting anywhere at all.
PIL was discontinued in 2011 and only supports Python 2. To use its developers' own description, Pillow is the friendly PIL fork that kept the library alive and includes support for Python 3.
Step 2: To check if PIL is successfully installed, open up the python terminal by typing python3 in the terminal. This will open up the python3 interactive console now type the following command to check the current version of the PIL. This will output the currently installed version of the PIL.
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class with the same name which is used to represent a PIL image.
I had to install python-dev then install PIL inside my virtualenv.
All working now.
Thanks for your help all! :)
If you are not root, then entering the following command should install python-imaging:
sudo apt-get install python-imaging
Or (if you are root), the following command (without sudo) will install python-imaging
apt-get install python-imaging
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With