Python 2.7 support issues
See original GitHub issueI am need to use Spacy in a python 2 environment, and installed it in a virtual environment. I have been using Mac for development. For a quick test, it reports the following error:
# -*- coding: utf-8 -*-
import spacy
nlp = spacy.load("en_core_web_sm")
doc = nlp("Autonomous cars shift insurance liability toward manufacturers")
for token in doc:
print(token.text, token.dep_, token.head.text, token.head.pos_,
[child for child in token.children])
The error messages:
Traceback (most recent call last):
File "/Users/congminmin/nlp/wb2/spaCy/test.py", line 3, in <module>
import spacy
File "/Users/congminmin/nlp/wb2/spaCy/spacy/__init__.py", line 12, in <module>
from . import pipeline
File "/Users/congminmin/nlp/wb2/spaCy/spacy/pipeline/__init__.py", line 4, in <module>
from .pipes import Tagger, DependencyParser, EntityRecognizer, EntityLinker
File "pipes.pyx", line 25, in init spacy.pipeline.pipes
File "/Users/congminmin/nlp/wb2/spaCy/spacy/pipeline/functions.py", line 4, in <module>
from ..language import component
File "/Users/congminmin/nlp/wb2/spaCy/spacy/language.py", line 31, in <module>
from .lang.tokenizer_exceptions import TOKEN_MATCH, URL_MATCH
File "/Users/congminmin/nlp/wb2/spaCy/spacy/lang/tokenizer_exceptions.py", line 62, in <module>
URL_MATCH = re.compile("(?u)" + URL_PATTERN).match
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 194, in compile
return _compile(pattern, flags)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 251, in _compile
raise error, v # invalid expression
sre_constants.error: bad character range
The Spacy is compatible with python 2.7. Right?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Sunsetting Python 2
As of January 1st, 2020 no new bug reports, fixes, or changes will be made to Python 2, and Python 2 is no...
Read more >Extended Support Past Python 2 EOL - ActiveState
Without support, Python 2 codebases will continue to become less reliable and more vulnerable as security issues emerge over time. ActiveState's extended ...
Read more >How to Secure Python 2 Past End of Life (EOL) with ActiveState
Answer: Official support and maintenance for Python 2 ended on January 1, 2020. The Python Software Foundation no longer offers bug fixes and ......
Read more >Azure SDK Python packages support for Python 2.7 is ending ...
The Python Software Foundation (PSF) community announced the end of support of Python 2 "as of 01 January 2020, no new bug reports,...
Read more >How is Python 2 supported in RHEL after 2020?
The PSF have announced that their "official" support of version 2 of the Python language ends on January 1st 2020 as described at:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I can close.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.