简体   繁体   中英

PIL - error whilst installing openerp

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 :((

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM