Search code examples
pythondjangodreamhost

Why is my Django module missing?


I'm getting an error:

ImportError at /
No module named lxml
Request Method: GET
Request URL:    http://www.myurl.com/
Django Version: 1.2.1
Exception Type: ImportError
Exception Value:    
No module named lxml
Exception Location: /mypath/project/app/views.py in <module>, line 4
Python Executable:  /usr/bin/python
Python Version: 2.5.2
Python Path:    ['/usr/local/dh/passenger/lib/phusion_passenger/wsgi', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/var/lib/python-support/python2.5', '/usr/lib/site-python', '/home/mysite/mysite.com', '/home/mysite/local/lib/python2.5/site-packages']
Server time:    Wed, 8 Dec 2010 22:59:32 -0500

I changed the names of the paths, obviously, but within my home/mysite/local/lib/python2.5/site-packages folder, I do have lxml-2.3beta1-py2.5-linux-x86_64.egg, so how come Django can't find it?


Solution

  • Because the .egg isn't in sys.path. If you've installed it to a custom path then you'll need to add it in yourself.