Python: ImportError: No module named os

error_log

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

-shell-

[root@lts5srv1 home]# ldd /root/epd-5.1.0/bin/python
    libpython2.5.so.1.0 => /root/epd-5.1.0/lib/libpython2.5.so.1.0 (0x00002b0829205000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003da0600000)
    libdl.so.2 => /lib64/libdl.so.2 (0x0000003d9fe00000)
    libutil.so.1 => /lib64/libutil.so.1 (0x0000003dadc00000)
    libm.so.6 => /lib64/libm.so.6 (0x0000003da0200000)
    libc.so.6 => /lib64/libc.so.6 (0x0000003d9fa00000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003d9f600000)

Weiß jemand wie man dieses Problem lösen Fehler? es ist der einzige Fehler, den ich bekomme, wenn ich versuche, führen Sie ein python-Skript oder ein django.wsgi-Skript in einem redhat-system, danach werde ich hochladen mein web-app in einem Uni-server... und ich habe schon configuret der VirtualHost. So, dass war das einzige problem, kann jemand bitte helfen? Danke.

  • Ihre python-Installation ist vermurkst ...
  • ja! In der Tat Import os von der Kommandozeile aus.. ich bekomme keine Fehlermeldung.. $ python, >>> import os, >>> os >>> <Modul 'os' aus '/root/epd-5.1.0/lib/python2.5/os.pyc'>..
  • Sind Sie sicher, dass mod_wsgi und die REPL mit der gleichen Python installieren?
  • wie kann ich es überprüfen?
  • Führen Sie ldd gegen das Modul.
  • Vielen Dank an alle für die Hilfe. Ich habe das problem der Installation von python2.6 und neu zu installieren alle benötigten module mit python2.6, so dass ich aufgehört habe mit dem Standard-python installiert..

InformationsquelleAutor Kreshnik | 2012-09-07
Schreibe einen Kommentar