我只是尝试了到目前为止找到的所有内容,但仍然无法加载spacy模型。 每次启动python文件
时,都会遇到相同的问题OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
通过pip,pip3和conda安装了spacy。 我猜我使用了不同的python版本。我的侧包有其他位置,请参见下文。
(.env) ws-84-32:~ philadam1$ python -m spacy download en
Requirement already satisfied: en_core_web_sm==2.1.0 from https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz#egg=en_core_web_sm==2.1.0 in ./.env/lib/python3.7/site-packages (2.1.0)
You are using pip version 19.0.3, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
✔ Download and installation successful
You can now load the model via spacy.load('en_core_web_sm')
✔ Linking successful
/Users/philadam1/.env/lib/python3.7/site-packages/en_core_web_sm -->
/Users/philadam1/.env/lib/python3.7/site-packages/spacy/data/en
You can now load the model via spacy.load('en')
(.env) ws-84-32:~ philadam1$ which python
/Users/philadam1/.env/bin/python