当我执行python脚本时,会出现这个问题:
'import site' failed; use -v for traceback
所以我再次尝试使用 -v 选项,我可以得到这些消息:
'import site' failed; traceback:
Traceback (most recent call last):
File "/usr/lib/python2.6/site.py", line 513, in <module>
main()
File "/usr/lib/python2.6/site.py", line 495, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python2.6/site.py", line 238, in addusersitepackages
USER_BASE = env_base if env_base else joinuser("~", ".local")
File "/usr/lib/python2.6/site.py", line 225, in joinuser
return os.path.expanduser(os.path.join(*args))
File "/usr/lib/python2.6/posixpath.py", line 256, in expanduser
userhome = pwd.getpwuid(os.getuid()).pw_dir
KeyError: 'getpwuid(): uid not found: 65530'
我该如何处理这种情况?