我試圖找出最初的sys.path
值來自哪裏。一個ubuntu系統突然(我的意思是可能由某人做某事奇怪地手動)失去了在陣列末尾的條目。初始sys.path來自哪裏
所有其他主機:['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7']
該主機:['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
的/usr/lib/pymodules/python2.7
路徑是一個我真正關心。但它來自健康的節點呢?
不錯。顯然python支持的某些文件被刪除(.pth),所以即使python-support在那裏,它也沒有更新目錄。 apt-get install --reinstall在python-support和所有python- *軟件包的幫助下。 – viraptor