linux\u mint17.3,python2.7,哪个pi

2024-09-29 00:21:00 发布

您现在位置:Python中文网/ 问答频道 /正文

linux pythonpillow

我刚升级到mint 17.3。文档说这是一个Ubuntu14.04内核。 我希望运行python和python imaging libarry=>;枕头。你知道吗

当我运行>;python<;(命令行)时,我得到如下结果:

grumpy@grumpy-desktop ~ $ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

我假设python2.7.6是使用的默认模块。usr内部/ lib/python2.6、python2.7、python3和python3.4都存在。 但是,我一直无法得到正在使用的PIL或枕头的版本。 PIL存在于usr/lib/python3/dist-packages/PIL,以及 ~/Pillow2.3.0.eggs-info(这里没什么帮助。)

文档表明Linux mint17.3,带有Umbuntu14.04 Kurnel和 python2.7,枕头2.3.0将是最合适的。你知道吗

所以问题是,如何安装Pillow2.3.0和所有模块, 功能齐全。我希望包括在脚本中

Image.putpixel(xy, value)

Image.putdata(data, scale=1.0, offset=0.0)

目前当我运行以上我得到

AttributeError: 'module' object has no attribute 'putdata' (or 'putpixel')

或者,如果需要; 如何更改使用的python版本,以便安装另一个枕头版本 功能齐全。 谢谢你们的意见。你知道吗


Tags: 模块or文档imagegt版本pillinux