cubeboy
Posts: 2
Joined: Tue Dec 08, 2015 11:05 am

(solved) import error PIL with SenseHat

Tue Dec 08, 2015 12:01 pm

Hi everybody, beginner with python and raspberry here. I am looking for some help with the software installation of the SenseHat (bought few weeks ago).

I installed the software following the guide on the website (https://www.raspberrypi.org/learning/ge ... /software/), but at the time I want to install pillow, I get this error message :
pi@raspberrypi ~ $ sudo pip-3.2 install pillow
Downloading/unpacking pillow
Running setup.py egg_info for package pillow

Installing collected packages: pillow
Running setup.py install for pillow

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/pi/build/pillow/setup.py", line 767, in <module>
zip_safe=not debug_build(),
File "/usr/lib/python3.2/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.2/distutils/dist.py", line 917, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 53, in run
return _install.run(self)
File "/usr/lib/python3.2/distutils/command/install.py", line 607, in run
self.run_command('build')
File "/usr/lib/python3.2/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/usr/lib/python3.2/distutils/command/build.py", line 126, in run
self.run_command(cmd_name)
File "/usr/lib/python3.2/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/usr/lib/python3.2/distutils/command/build_ext.py", line 344, in run
self.build_extensions()
File "/home/pi/build/pillow/setup.py", line 515, in build_extensions
% (f, f))
ValueError: --enable-jpeg requested but jpeg not found, aborting.
Complete output from command /usr/bin/python3.2 -c "import setuptools;__file__='/home/pi/build/pillow/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-7ck4xh-record/install-record.txt:
running install

running build

running build_py

running egg_info

writing Pillow.egg-info/PKG-INFO

writing top-level names to Pillow.egg-info/top_level.txt

writing dependency_links to Pillow.egg-info/dependency_links.txt

warning: manifest_maker: standard file '-c' not found



reading manifest file 'Pillow.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'Pillow.egg-info/SOURCES.txt'

running build_ext

Traceback (most recent call last):

File "<string>", line 1, in <module>

File "/home/pi/build/pillow/setup.py", line 767, in <module>

zip_safe=not debug_build(),

File "/usr/lib/python3.2/distutils/core.py", line 148, in setup

dist.run_commands()

File "/usr/lib/python3.2/distutils/dist.py", line 917, in run_commands

self.run_command(cmd)

File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command

cmd_obj.run()

File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 53, in run

return _install.run(self)

File "/usr/lib/python3.2/distutils/command/install.py", line 607, in run

self.run_command('build')

File "/usr/lib/python3.2/distutils/cmd.py", line 313, in run_command

self.distribution.run_command(command)

File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command

cmd_obj.run()

File "/usr/lib/python3.2/distutils/command/build.py", line 126, in run

self.run_command(cmd_name)

File "/usr/lib/python3.2/distutils/cmd.py", line 313, in run_command

self.distribution.run_command(command)

File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command

cmd_obj.run()

File "/usr/lib/python3.2/distutils/command/build_ext.py", line 344, in run

self.build_extensions()

File "/home/pi/build/pillow/setup.py", line 515, in build_extensions

% (f, f))

ValueError: --enable-jpeg requested but jpeg not found, aborting.

----------------------------------------
Command /usr/bin/python3.2 -c "import setuptools;__file__='/home/pi/build/pillow/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-7ck4xh-record/install-record.txt failed with error code 1 in /home/pi/build/pillow
Storing complete log in /root/.pip/pip.log
Do you guys know how can I install it ? I tried to run the basic programs from the "getting started" page, and unfortunately I get a message saying ImportError : No module named PIL.

thank you for your help.
Last edited by cubeboy on Tue Dec 08, 2015 1:30 pm, edited 1 time in total.

cubeboy
Posts: 2
Joined: Tue Dec 08, 2015 11:05 am

Re: import error PIL with SenseHat

Tue Dec 08, 2015 1:26 pm

Sorry for the too quick post, problem solved. For those who get the same issue, this helped me :

viewtopic.php?f=63&t=125705&p=842302&hi ... ow#p842302

Despite being with the most upgraded version of debian, I had to run this code line before installing pip.

Thanks anyway !

Return to “Astro Pi”