在某些python文件上Ctrl+b
有效。在某个目录之外的文件上,它会失败。以前,它到处都有用。我最近pip安装
一些推特模块。
追踪:
[0, 0, 9, 5, 6, 4, 6, 7, 8, 4]
Traceback (most recent call last):
File "/usr/lib64/python2.7/site.py", line 568, in <module>
main()
File "/usr/lib64/python2.7/site.py", line 550, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib64/python2.7/site.py", line 278, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib64/python2.7/site.py", line 253, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib64/python2.7/site.py", line 243, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib64/python2.7/sysconfig.py", line 521, in get_config_var
return get_config_vars().get(name)
File "/usr/lib64/python2.7/sysconfig.py", line 420, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib64/python2.7/sysconfig.py", line 283, in _init_posix
_parse_makefile(makefile, vars)
File "/usr/lib64/python2.7/sysconfig.py", line 196, in _parse_makefile
_variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")
AttributeError: 'module' object has no attribute 'compile'
答案 0 :(得分:0)
为了将来:我最近没有命名文件re.py,但是一个月之前,然后合并了两个dir,并且在一长串文件中有一个隐藏的re.pyc文件。删除了re.pyc,问题解决了。