每当我键入任何“废话”命令时,都会生成此python错误消息。普通命令可以正常工作。知道如何调试吗?
$ somenonexistingcommand
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site.py", line 553, in <module>
main()
File "/usr/local/lib/python2.7/site.py", line 535, in main
known_paths = addusersitepackages(known_paths)
File "/usr/local/lib/python2.7/site.py", line 268, in addusersitepackages
user_site = getusersitepackages()
File "/usr/local/lib/python2.7/site.py", line 243, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/local/lib/python2.7/site.py", line 233, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/local/lib/python2.7/sysconfig.py", line 535, in get_config_var
return get_config_vars().get(name)
File "/usr/local/lib/python2.7/sysconfig.py", line 434, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/local/lib/python2.7/sysconfig.py", line 298, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/include/python2.7/pyconfig.h (No such file or directory)
$ echo this works fine, however
this works fine, however
$
编辑 -修复我的/ usr / bin / python后,我现在得到以下不同的python错误消息:
$ yetanothernonexistingcommand
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 10, in <module>
import CommandNotFound
ImportError: No module named CommandNotFound
不知何故,每当我输错命令时,Python就会运行。