"넌센스"명령을 입력 할 때마다이 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
어떻게 든 명령을 잘못 입력 할 때마다 파이썬이 실행됩니다.