Project

General

Profile

start-leginon.py: ImportError: No module named Image

Added by Jason de la Cruz almost 11 years ago

Upon starting start-leginon.py on a linux host (processing server), I get the following output:

[jason@leginon-pc leginon]$ start-leginon.py
Traceback (most recent call last):
File "/usr/bin/start-leginon.py", line 9, in <module>
from leginon import start
File "/usr/lib/python2.7/site-packages/leginon/start.py", line 13, in <module>
import leginon.gui.wx.Manager
File "/usr/lib/python2.7/site-packages/leginon/gui/wx/Manager.py", line 20, in <module>
from leginon import manager
File "/usr/lib/python2.7/site-packages/leginon/manager.py", line 19, in <module>
import launcher
File "/usr/lib/python2.7/site-packages/leginon/launcher.py", line 14, in <module>
import noderegistry
File "/usr/lib/python2.7/site-packages/leginon/noderegistry.py", line 33, in <module>
import leginon.allnodes
File "/usr/lib/python2.7/site-packages/leginon/allnodes.py", line 13, in <module>
from presets import PresetsManager
File "/usr/lib/python2.7/site-packages/leginon/presets.py", line 15, in <module>
import calibrationclient
File "/usr/lib/python2.7/site-packages/leginon/calibrationclient.py", line 20, in <module>
from pyami import correlator, peakfinder, arraystats, imagefun, fftfun, numpil, ellipse
File "/usr/lib/python2.7/site-packages/pyami/numpil.py", line 2, in <module>
import Image
ImportError: No module named Image

This error seems to imply that the "python imaging library (PIL)" is not installed. Indeed, after running syscheck.py, I get the following output:

[jason@leginon-pc leginon]$ syscheck.py
--------------------------------------------------------------
Looking for previously installed Leginon...
None found.

These are the locations where various config files will be searched.
Please review any existing config files and update them if necessary.
/usr/lib/python2.7/site-packages/sinedon
/etc/myami
/usr/lib/python2.7/site-packages/leginon
/home/jason
/usr/lib/python2.7/site-packages/pyscope

--------------------------------------------------------------
Python:
Python executable (if wrong, check PATH in your environment):
/usr/bin/python
Python module search path (if wrong, check PYTHONPATH):
/Software/myami/leginon
/usr/lib64/python27.zip
/usr/lib64/python2.7
/usr/lib64/python2.7/plat-linux2
/usr/lib64/python2.7/lib-tk
/usr/lib64/python2.7/lib-old
/usr/lib64/python2.7/lib-dynload
/usr/lib64/python2.7/site-packages
/usr/lib64/python2.7/site-packages/gtk-2.0
/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode
/usr/lib/python2.7/site-packages
/usr/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info
Python version: 2.7.5
OK (at least 2.3.4 required)
Python says home directory is: /home/jason
--------------------------------------------------------------
Python Imaging Library (PIL):
importing Image module... *** Could not import Image module.
You must install Python Imaging Library version 1.1.4 or greater
--------------------------------------------------------------
MySQL Python client (MySQLdb):
importing MySQLdb module...
Python MySQL version: 1.2.3
OK (at least 1.2 required)
--------------------------------------------------------------
numpy:
importing numpy module...
numpy version: 1.7.1
OK (at least 1.0.1 required)
--------------------------------------------------------------
scipy:
importing scipy.optimize module...
testing for leastsq function...
OK
--------------------------------------------------------------
wxPython:
importing wx module...
wxPython version: 2.8.12.0
OK (at least 2.5.2.8 required)
Testing a wxPython application. Close the window that pops up...
wxPython test successful

This processing server is running Fedora 19, and all dependencies were installed through yum, including python-imaging. Please advise.


Replies (2)

RE: start-leginon.py: ImportError: No module named Image - Added by Sargis Dallakyan almost 11 years ago

It seems that there some backwards incompatible changes done in Fedora 19 that might be causing this: http://fedoraproject.org/wiki/Features/Pillow

Since we don't have any Fedora 19 machine in our lab (we only support CentOS 6), I recommend installing PIL from source (http://www.pythonware.com/products/pil/) to see if that helps. Another option might by to run the following command as root:

echo PIL| cat  > /usr/lib64/python2.7/site-packages/PIL.pth

This assumes that yum install python-imaging created /usr/lib64/python2.7/site-package/PIL folder.

RE: start-leginon.py: ImportError: No module named Image - Added by Jason de la Cruz almost 11 years ago

Thanks, the second option seems to work (I am able to see the GUI now).

    (1-2/2)