Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


[Fri Sep 07 16:30:14 2012] [error] import os
[Fri Sep 07 16:30:14 2012] [error] ImportError: No module named os


[root@lts5srv1 home]# ldd /root/epd-5.1.0/bin/python => /root/epd-5.1.0/lib/ (0x00002b0829205000) => /lib64/ (0x0000003da0600000) => /lib64/ (0x0000003d9fe00000) => /lib64/ (0x0000003dadc00000) => /lib64/ (0x0000003da0200000) => /lib64/ (0x0000003d9fa00000)
    /lib64/ (0x0000003d9f600000)

Anybody know how to solve this error? it's the only error that i get when i try to run a python script or a django.wsgi script in a redhat system, after that i'm going to upload my web-app in a university server... and i've already configuret the VirtualHost. So that was the only problem, can anybody help please? Thank You.

share|improve this question

closed as off topic by Shane Madden, Ward, mulaz, Scott Pack, MDMarra Sep 28 '12 at 22:50

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Which path did you set WSGIPythonPath to? – quanta Sep 7 '12 at 16:19
/root/epd-5.1.0/bin/python – Kreshnik Sep 7 '12 at 16:28

WSGIPythonPath is used to search for Python modules, not the path to Python binary. Point it to something like /usr/lib/python2.7/ and try again.

# ls -l /usr/lib/python2.7/*
-rw-r--r-- 1 root root 26300 Mar  7  2012 /usr/lib/python2.7/
-rw-r--r-- 1 root root 26035 Mar  7  2012 /usr/lib/python2.7/os.pyc
-rw-r--r-- 1 root root 26035 Mar  7  2012 /usr/lib/python2.7/os.pyo
share|improve this answer
i've changed to this: /root/epd-5.1.0/lib/python2.5 – Kreshnik Sep 7 '12 at 16:44
and doesn't work! It still generates the same error. – Kreshnik Sep 7 '12 at 16:44
Does os module exist in /root/epd-5.1.0/lib/python2.5? How many Python versions on your system? – quanta Sep 7 '12 at 16:49
yes, it exists. – Kreshnik Sep 7 '12 at 16:56
it is missing only "os.pyo".. – Kreshnik Sep 7 '12 at 16:58
up vote 0 down vote accepted

The solution for me, was: re-installing a new version of Python and the other needed modules inside the new Python site-packages folder. Follow this link to see the various steps..: solution

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.