当我执行Google搜索时,似乎还有其他错误,例如unpack
和load
。但找不到compile
的任何内容。
Traceback (most recent call last):
File "C:\Users\Jason\Google Drive\python\test.py", line 7, in <module>
nlp = spacy.load('en_core_web_sm')
File "C:\Python27\lib\site-packages\spacy\__init__.py", line 15, in load
return util.load_model(name, **overrides)
File "C:\Python27\lib\site-packages\spacy\util.py", line 114, in load_model
return load_model_from_package(name, **overrides)
File "C:\Python27\lib\site-packages\spacy\util.py", line 135, in load_model_from_package
return cls.load(**overrides)
File "C:\Python27\lib\site-packages\en_core_web_sm\__init__.py", line 12, in load
return load_model_from_init_py(__file__, **overrides)
File "C:\Python27\lib\site-packages\spacy\util.py", line 173, in load_model_from_init_py
return load_model_from_path(data_path, meta, **overrides)
File "C:\Python27\lib\site-packages\spacy\util.py", line 143, in load_model_from_path
cls = get_lang_class(meta['lang'])
File "C:\Python27\lib\site-packages\spacy\util.py", line 50, in get_lang_class
module = importlib.import_module('.lang.%s' % lang, 'spacy')
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Python27\lib\site-packages\spacy\lang\en\__init__.py", line 13, in <module>
from ..tokenizer_exceptions import BASE_EXCEPTIONS
File "C:\Python27\lib\site-packages\spacy\lang\tokenizer_exceptions.py", line 56, in <module>
TOKEN_MATCH = re.compile(URL_PATTERN, re.UNICODE).match
AttributeError: 'module' object has no attribute 'compile'