python - PIL - 安装 openerp 时出错

标签 python ubuntu python-imaging-library openerp-7

问候...

虽然我不认为一个是由另一个引起的 - 在 Ubuntu 14.04 服务器上安装 openerp 7 时,使用 sudo python setup.py install 我收到一个 PIL 错误

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')

我在使用 ubuntu 16 和 openerp 7 时遇到了同样的问题,因此尝试使用 14 :(

当您点击链接https://pypi.python.org/simple/PIL/ ubuntus正确时没有链接。我认为这就是问题所在。

非常感谢任何帮助或指导 - 头发用完了:((

最佳答案

类似的事情也发生在我身上 我是这样解决的

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

并尝试通过pip install PIL进行安装。

有关 pip 的更多信息,请参阅 here 。简而言之,这是一种安装 python 库的便捷(并成为标准)方式。

如果仍然失败,可能是由于 PIL 在不同的路径中搜索这些库。

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.

尝试查看 /usr/lib/x86_64-linux-gnu 中是否存在 libjpeg 和 libz 库,并以这种方式创建符号链接(symbolic link)

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/
<小时/>

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

关于python - PIL - 安装 openerp 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36999895/

相关文章:

image-processing - 除了标准/渐进式,第三种JPEG压缩: load by channel?

python - 添加具有颜色属性的边/节点

php - 安装 Laravel 5.0

python - 从 numpy 数组转换为 PIL 图像 python 后图像颜色发生变化

python - np.array 到 PIL 图像 --> Typerror : Cannot handle this data type: (1, 1, 12), |u1

ubuntu - cmake: "make install"未链接到 Ubuntu 中的库

python - 使用类/返回列表进行多处理 - Python

python - 仅从数组中的大元素中减去 10000

python - 将 C++ 类移植到 PyQt

Django celery daemon 给出 'supervisor FATAL can' t find command',但路径是正确的