1
votes

Greatings...

Although I dont think one is caused by the other - whilst installing openerp 7 on Ubuntu 14.04 server, using sudo python setup.py install I get a PIL error

Installed /usr/local/lib/python2.7/dist-packages/openerp-7.0_20160502-py2.7.egg Processing dependencies for openerp==7.0-20160502 Searching for PIL Reading http://download.gna.org/pychart/ Reading https://pypi.python.org/simple/PIL/ No local packages or download links found for PIL error: Could not find suitable distribution for Requirement.parse('PIL')

I had the same problem when using ubuntu 16 and openerp 7 hence the attempt with 14 :(

When you follow the link https://pypi.python.org/simple/PIL/ ubuntus correct theres no Links. I assume this is the problem.

Any help or direction greatly appreciated - running out of hair :((

1
Have you tried following answer ? - Bhavesh Odedra
IMO don't use sudo with pip instead use sudo apt install python-pil or use pip install --user <my-packages> after making sure dependencies of <my-packages> are met (see answer below) - Mark Mikofski

1 Answers

1
votes

Something similar happened to me, I solved this way

sudo apt-get install libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev

And try there installing via pip install PIL.

More on what pip is can be found here. In short is a convenient (and becoming a standard) way of installing python libraries.

if it continues to fail, it can be due to PIL searching those libraries in a different path.

It turns out that the APT installations put the libraries under /usr/lib/x86_64-linux-gnu and PIL will search for them in /usr/lib/. So you have to create symlinks for PIL to see them.

Try to see if libjpeg and libz libs exist in /usr/lib/x86_64-linux-gnu and make a symlink this way

sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 /lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so.6 /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so.62 /usr/lib/

Source: http://jj.isgeek.net/2011/09/install-pil-with-jpeg-support-on-ubuntu-oneiric-64bits/