I see two different python paths in django.
This one shows up with the development server(i.e. python manage.py runserver etc.):
['/var/www/html/django/congressticketing',
'/usr/lib/python2.4/site-packages/MySQL_python-1.2.3c1-py2.4-linux-i686.egg', '/usr/lib/python2.4/site-packages/pisa-3.0.32-py2.4.egg',
'/usr/lib/python2.4/site-packages/Whoosh-0.3.9-py2.4.egg',
'/usr/lib/python2.4/site-packages/html5lib-0.11-py2.4.egg',
'/usr/lib/python2.4/site-packages/multiprocessing-2.6.2.1-py2.4-linux-i686.egg','/usr/lib/python2.4/site-packages/anyjson-0.2.4-py2.4.egg',
'/usr/lib/python2.4/site-packages/SQLAlchemy-0.6.0-py2.4.egg',
'/usr/lib/python2.4/site-packages/mailer-0.5-py2.4.egg',
'/usr/lib/python2.4/site-packages/python_dateutil-1.5-py2.4.egg',
'/usr/lib/python2.4/site-packages/simplejson-2.1.1-py2.4-linux-i686.egg', '/usr/lib/python2.4/site-packages/dottedish-0.6-py2.4.egg',
'/usr/lib/python2.4/site-packages/simplegeneric-0.6-py2.4.egg',
'/usr/lib/python2.4/site-packages/supervisor-3.0a8-py2.4.egg',
'/usr/lib/python2.4/site-packages/elementtree-1.2.7_20070827_preview-py2.4.egg', '/usr/lib/python2.4/site-packages/meld3-0.6.6-py2.4.egg',
'/usr/lib/python2.4/site-packages/billiard-0.3.1-py2.4.egg',
'/usr/lib/python2.4/site-packages/pycrypto-2.2-py2.4-linux-i686.egg', '/usr/lib/python2.4/site-packages/Trac-0.12-py2.4.egg',
'/usr/lib/python2.4/site-packages/Genshi-0.6-py2.4.egg',
'/usr/lib/python2.4/site-packages/django_thumbnail_works-0.2.0-py2.4.egg', '/usr/lib/python2.4/site-packages/cropresize-0.1.4-py2.4.egg',
'/usr/lib/python2.4/site-packages/uuid-1.30-py2.4.egg',
'/usr/lib/python2.4/site-packages/pyparsing-1.5.5-py2.4.egg',
'/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg',
'/usr/lib/python2.4/site-packages/django_compress-1.0.1-py2.4.egg', '/usr/lib/python2.4/site-packages/BeautifulSoup-3.2.0-py2.4.egg',
'/usr/lib/python2.4/site-packages/lxml-2.3beta1-py2.4-linux-i686.egg', '/usr/lib/python2.4/site-packages/django_celery-2.1.4-py2.4.egg',
'/usr/lib/python2.4/site-packages/sorl_thumbnail-10.12-py2.4.egg', '/usr/lib/python2.4/site-packages',
'/usr/lib/python24.zip',
'/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2',
'/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload',
'/usr/lib/python2.4/site-packages/Numeric',
'/usr/lib/python2.4/site-packages/PIL',
'/usr/lib/python2.4/site-packages/gtk-2.0']
This one - much shorter - shows up in production(using mod_python):
['/var/www/html/django/congressticketing',
'/usr/lib/python2.4/site-packages/MySQL_python-1.2.3c1-py2.4-linux-i686.egg', '/usr/lib/python2.4/site-packages/pisa-3.0.32-py2.4.egg',
'/usr/lib/python2.4/site-packages/Whoosh-0.3.9-py2.4.egg',
'/usr/lib/python2.4/site-packages/html5lib-0.11-py2.4.egg',
'/usr/lib/python2.4/site-packages/multiprocessing-2.6.2.1-py2.4-linux-i686.egg', '/usr/lib/python2.4/site-packages/anyjson-0.2.4-py2.4.egg',
'/usr/lib/python2.4/site-packages/SQLAlchemy-0.6.0-py2.4.egg',
'/usr/lib/python2.4/site-packages/python_dateutil-1.5-py2.4.egg',
'/usr/lib/python2.4/site-packages/simplejson-2.1.1-py2.4-linux-i686.egg', '/usr/lib/python2.4/site-packages/dottedish-0.6-py2.4.egg',
'/usr/lib/python2.4/site-packages/supervisor-3.0a8-py2.4.egg',
'/usr/lib/python2.4/site-packages/billiard-0.3.1-py2.4.egg',
'/usr/lib/python2.4/site-packages/Trac-0.12-py2.4.egg',
'/usr/lib/python2.4/site-packages/django_thumbnail_works-0.2.0-py2.4.egg', '/usr/lib/python2.4/site-packages/cropresize-0.1.4-开发者_如何转开发py2.4.egg',
'/usr/lib/python2.4/site-packages/pyparsing-1.5.5-py2.4.egg',
'/usr/lib/python2.4/site-packages/carrot-0.10.7-py2.4.egg',
'/usr/lib/python2.4/site-packages/BeautifulSoup-3.2.0-py2.4.egg',
'/usr/lib/python2.4/site-packages/lxml-2.3beta1-py2.4-linux-i686.egg', '/usr/lib/python2.4/site-packages/django_celery-2.1.4-py2.4.egg',
'/usr/lib/python2.4/site-packages/sorl_thumbnail-10.12-py2.4.egg', '/usr/lib/python2.4/site-packages',
'/usr/lib/python24.zip',
'/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2',
'/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload',
'/usr/lib/python2.4/site-packages/Numeric',
'/usr/lib/python2.4/site-packages/PIL',
'/usr/lib/python2.4/site-packages/gtk-2.0']
Does anyone have any idea why this is?
It could be a permissions problem. Check the file and directory permissions on the missing site-packages. It could be that those files are not accessible to the user name under which mod_python
or Apache
is running.
精彩评论