failed to make Sense Hat work with Raspberry Pi under Python 3

In order to use Sense Hat https://www.raspberrypi.org/products/sense-hat/ under Python 3, I tried to run "sudo pip-3.2 install pillow" because that was what I was told when I tried to run "sudo apt-get install sense-hat" (http://pythonhosted.org/sense-hat/). However, below error happened. Does any one know how to solve this problem? Thanks!

...If I2C was disabled prior to this installation, a reboot is required.
To work under Python 3, the Sense HAT library requires pillow.
This can be installed by running 'sudo pip-3.2 install pillow'.
pi@raspberrypi ~ $ sudo pip-3.2 install pillow
Downloading/unpacking pillow
  Downloading Pillow-3.0.0.tar.gz (9.6Mb): 9.6Mb downloaded
  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-rmz1jq-record/install-record.txt:
    running install

running build

running build_py

creating build

creating build/lib.linux-armv7l-3.2

creating build/lib.linux-armv7l-3.2/PIL

copying PIL/TarIO.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/WmfImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/FitsStubImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/_binary.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageCms.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageWin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageEnhance.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PdfImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PpmImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImtImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/XpmImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PcdImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ExifTags.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/McIdasImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/GimpGradientFile.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PalmImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/IptcImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageStat.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/WebPImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/features.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/DcxImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/FpxImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/TiffImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/GifImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageTk.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PaletteFile.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageGrab.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/BmpImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/JpegPresets.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/MpegImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageFile.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/MpoImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/IcnsImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PsdImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/GimpPaletteFile.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageFont.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PSDraw.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/_util.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImagePath.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/WalImageFile.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/OleFileIO.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageDraw.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/GribStubImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PixarImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/BdfFontFile.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/XbmImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/__init__.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/SpiderImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageFilter.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PyAccess.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/MspImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageMath.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/GdImageFile.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageShow.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageChops.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/TgaImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImagePalette.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageMode.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/SunImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageMorph.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PngImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/MicImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageOps.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/FontFile.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/GbrImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/XVThumbImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/BufrStubImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/TiffTags.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/Image.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ContainerIO.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/JpegImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PcfFontFile.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageQt.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/FliImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageColor.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageSequence.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/PcxImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageDraw2.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/EpsImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/CurImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/ImageTransform.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/SgiImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

copying PIL/IcoImagePlugin.py -> build/lib.linux-armv7l-3.2/PIL

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'

copying PIL/OleFileIO-README.md -> build/lib.linux-armv7l-3.2/PIL

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-rmz1jq-record/install-record.txt failed with error code 1 in /home/pi/build/pillow
Storing complete log in /root/.pip/pip.log

Open in new window

condor888Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gerwin Jansen, EE MVETopic Advisor Commented:
It reports you need jpeg to build sense-hat, try this first:

sudo apt-get install libjpeg-dev
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
condor888Author Commented:
That worked! Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Embedded Hardware

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.