When running python -m spacy download en_core_web_sm, I am getting an AssertionError within pip internals. Since I've been using spacy forever and I'd never seen this before, I downgraded pip to 18.1 (from 19.0) and the error disappeared. I am on Pop!_OS, which is a thin layer over Ubuntu 18.10.
(venv) sam@pop-os:~/$ pip --version
pip 19.0 from /home/sam/venv/lib/python3.6/site-packages/pip (python 3.6)
(venv) sam@pop-os:~/$ python -m spacy download en_core_web_sm
Collecting en_core_web_sm==2.0.0 from https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz#egg=en_core_web_sm==2.0.0
Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz (37.4MB)
100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 37.4MB 78.8MB/s
Exception:
Traceback (most recent call last):
File "/home/sam/venv/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 176, in main
status = self.run(options, args)
File "/home/sam/venv/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 346, in run
session=session, autobuilding=True
File "/home/sam/venv/lib/python3.6/site-packages/pip/_internal/wheel.py", line 848, in build
assert building_is_possible
AssertionError
(venv) sam@pop-os:~/$ pip install pip==18.1
(venv) sam@pop-os:~/$ python -m spacy download en_core_web_sm
Collecting en_core_web_sm==2.0.0 from https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz#egg=en_core_web_sm==2.0.0
Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz (37.4MB)
100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 37.4MB 63.5MB/s
Installing collected packages: en-core-web-sm
Running setup.py install for en-core-web-sm ... done
Successfully installed en-core-web-sm-2.0.0
This may be related to https://github.com/pypa/pip/issues/6158
Yes, the model downloader sets --no-cache-dir by default, to prevent the (potentially very large) model packages from being cached. So from that thread, it sounds like this is a more general pip issue and we just have to wait for a new pip update that resolves this?
Apparently another workaround is setting --cache-dir=/pipcache (any arbitrary directory manually) and then removing that cache? spacy download will pass all additional arguments down to the pip install call, so you could try python -m spacy download en_core_web_sm --cache-dir=/pipcache.
a possible workaround is downgrading by issuing pip install pip==18 or if you specifically need python3, like usually on Mac: pip3 install pip==18
New pip version seems to have resolved this
New pip version seems to have resolved this
For others reading this: this refers to version 19.0.1
Issue can be closed.
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.
Most helpful comment
Yes, the model downloader sets
--no-cache-dirby default, to prevent the (potentially very large) model packages from being cached. So from that thread, it sounds like this is a more general pip issue and we just have to wait for a new pip update that resolves this?Apparently another workaround is setting
--cache-dir=/pipcache(any arbitrary directory manually) and then removing that cache?spacy downloadwill pass all additional arguments down to thepip installcall, so you could trypython -m spacy download en_core_web_sm --cache-dir=/pipcache.