title: Import error: libjpeg.so.7: cannot open shared object file: No such file or directory
body: <p>I install the academic Enthought Cannopy on Redhat. When I type in </p>
  
  <pre><code>import _imaging
  </code></pre>
  
  <p>It print out the error message:</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: libjpeg.so.7: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>But on the Enthough website, it was said that the libjpeg has been included.</p>
  
  <p>The Canopy's version is 1.1.0. The output of <code>env</code> in terminal is:</p>
  
  <pre><code>MANPATH=/opt/torque/man:/usr/NX/bin:/usr/kerberos/bin:/usr/java/latest/bin:/share/apps/anaconda/bin:/usr/local/bin:/bin:/usr/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin/:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin://opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/openmpi/bin/:/opt/maui/bin:/opt/torque/bin:/opt/torque/sbin
  BIOROLL=/opt/bio
  
  TERM=xterm-256color
  SHELL=/bin/bash
  HISTSIZE=1000
  
  SSH_CLIENT=141.211.38.9 36340 22
  PHENIX_INSTALLER_DATE=300920111225
  ROCKSROOT=/opt/rocks/share/devel
  PHENIX_MVERSION=redhat-e5.4
  PHENIX=/share/apps/phenix-1.7.2-869
  SSH_TTY=/dev/pts/8
  ANT_HOME=/opt/rocks
  USER=xqding
  PHENIX_MTYPE=intel-linux-2.6-x86_64
  LS_COLORS=
  ROCKS_ROOT=/opt/rocks
  VIRTUAL_ENV=/home/xq/Enthought/Canopy_64bit/User
  MAIL=/var/spool/mail/xq
  PATH=/home/xqding/Enthought/Canopy_64bit/User/bin:/home/xq/Enthought/Canopy_64bit/User/bin:/home/xq/apps/bin:/share/apps/phenix-1.7.2-869/build/intel-linux-2.6-x86_64/bin:/library/yzhang/bin/HMMER:/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin:/mnt/sysimage/usr/X11R6/bin:/tmp/updates/rocks/bin:/tmp/updates/usr/sbin:/tmp/updates/sbin:/tmp/updates/usr/bin:/opt/rocks/bin:/opt/rocks/sbin:/opt/sun-ct/bin:/home/xq/apps/cd-hit-v4.6.1-2012-08-27:/home/xq/apps/samtools-0.1.19:/library/blast/bin:/home/xq/apps/cd-hit-v4.6-2012-04-25:/home/xq/apps/dssp-2.2.1:/home/xqding/apps/dssp-ver2hor:/home/xq/bin:/home/xq/apps/python/2.7/bin
  NXDIR=/usr/NX
  INPUTRC=/etc/inputrc
  PWD=/home/xqding/appsrc
  JAVA_HOME=/usr/java/latest
  EDITOR=emacsclient
  LANG=en_US.iso885915
  PHENIX_USE_MTYPE=intel-linux-2.6-x86_64
  PHENIX_ENVIRONMENT=1
  BLASTDB=/home/xqding/bio/ncbi/db
  PHENIX_VERSION=1.7.2
  SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
  PHENIX_RELEASE_TAG=869
  SHLVL=1
  HOME=/home/xq
  ROLLSROOT=/opt/rocks/share/devel/src/roll
  LOGNAME=xqding
  CVS_RSH=ssh
  LESSOPEN=|/usr/bin/lesspipe.sh %s
  BLASTMAT=/opt/bio/ncbi/data
  G_BROKEN_FILENAMES=1
  _=/usr/bin/env
  </code></pre>
  
  <hr>
  
  <p>I download the source code of libjpeg version 7 and install it on the Redhat computer. Then add the library directory to the <code>export LD_LIBRARY_PATH=directory of libjpeg</code>. Then the problem is solved. I appreciate the help I got from here. So I just add the solution.</p>