The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Python, Django install help please

Discussion in 'General Discussion' started by Bruce123, Apr 24, 2012.

  1. Bruce123

    Bruce123 Active Member

    Jul 19, 2005
    Likes Received:
    Trophy Points:
    We are a small software/web/app shop and maintain this server for our clients and are not so hot at server admin. After attempting to install python, django, mod_wsgi, and a couple of related pkgs and failing, we hired someone who has always done great work in the past to do this, but we just can't seem to get it running, although he claims it is. The client for whom we need the installation is running out of patience (I don't blame him - it's been months), and so any and all help will be HIGHLY appreciated.

    Server is WHM 11.32.2 & CENTOS 5.8 i686 std

    The initial installation attempts by us and also by our hired hand, and our feeble attempts at repair, were made in consideration of these resources -


    Installation included python, django, mod_wsgi, unicode csv for python: ( and mySQL python (

    The hired hand reported this following his installation -
    Done, 2.7 is installed in /usr/local/python2.7 Had to hack wsgi "custom cPanel config" to force wsgi to use python 2.7.


    root@ns5 [/usr/src]# ldd /usr/local/apache/modules/ | grep python => /usr/lib/ (0xb7dee000) after hacking, and recompiling:

    root@ns5 [/usr/src]# ldd /usr/local/apache/modules/ | grep python => /usr/local/python2.7/lib/ (0xb7da1000)

    Django is in ~legarein/.local/lib/python2.7/site-packages/django/

    The rest of packages, including setuptools are globally installed in python 2.7 lib

    - the mod_wsgi he's talking about is from the google code link above.

    I can see the selection in WHM easy apache, it is checked, and it did build OK. The client who uses python & django tells me that he doesn't think apache knows what to do with the requests. The installer says all is OK and working. The client is a brilliant guy and I have known him for years. He has software and other patents. I'm going with his assessment.

    When attempting to run anything python/django in his domain, he gets a 500 error and error log output like what is below.

    Thanks for your attention. BTW, I am willing to work on this with support from the kind folks here, but I am also willing to pay someone to go into the server and fix it.

    Thanks again.


    error log extract:

    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/", line 35, in import_module
    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/translation/", line 162, in _fetch
    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/translation/", line 185, in translation
    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/translation/", line 276, in do_translate
    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/translation/", line 286, in ugettext
    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/translation/", line 81, in ugettext
    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/", line 206, in __unicode_cast
    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/", line 71, in force_unicode
     File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/", line 30, in format
    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/", line 191, in r
    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/", line 30, in format
    File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/", line 285, in format
    File "/home/legarein/.local/lib/python2.7/site-packages/django/template/", line 695, in date
    File "/home/legarein/.local/lib/python2.7/site-packages/django/template/", line 536, in resolve
     File "/home/legarein/.local/lib/python2.7/site-packages/django/template/", line 90, in render
    File "/home/legarein/.local/lib/python2.7/site-packages/django/template/", line 73, in render_node
     File "/home/legarein/.local/lib/python2.7/site-packages/django/template/", line 744, in render
      File "/home/legarein/.local/lib/python2.7/site-packages/django/template/", line 117, in _render
      File "/home/legarein/.local/lib/python2.7/site-packages/django/template/", line 123, in render
     File "/home/legarein/.local/lib/python2.7/site-packages/django/views/", line 151, in get_traceback_html
     File "/home/legarein/.local/lib/python2.7/site-packages/django/views/", line 59, in technical_500_response
     File "/home/legarein/.local/lib/python2.7/site-packages/django/core/handlers/", line 203, in handle_uncaught_exception
     File "/home/legarein/.local/lib/python2.7/site-packages/django/core/handlers/", line 169, in get_response
    File "/home/legarein/.local/lib/python2.7/site-packages/django/core/handlers/", line 272, in __call__
    [Sun Apr 22 12:46:06 2012] mod_wsgi (pid=10948): Exception occurred processing WSGI script '/home/legarein/djangosites/legareinfo.wsgi

Share This Page