Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError when downloading models on pip 19.0, Ubuntu 18.10 #3187

Closed
sbrother opened this issue Jan 22, 2019 · 6 comments
Closed

AssertionError when downloading models on pip 19.0, Ubuntu 18.10 #3187

sbrother opened this issue Jan 22, 2019 · 6 comments
Labels
install Installation issues pip Issues related to the pip package manager third-party Third-party packages and services

Comments

@sbrother
Copy link

How to reproduce the problem

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

Your Environment

Info about spaCy

  • spaCy version: 2.0.18
  • Platform: Linux-4.18.0-13-generic-x86_64-with-Ubuntu-18.10-cosmic
  • Python version: 3.6.7
  • Models: en_core_web_sm
@sbrother
Copy link
Author

This may be related to pypa/pip#6158

@ines ines added install Installation issues third-party Third-party packages and services labels Jan 23, 2019
@ines
Copy link
Member

ines commented Jan 23, 2019

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.

@ines ines added the pip Issues related to the pip package manager label Jan 23, 2019
@tijsg
Copy link

tijsg commented Jan 23, 2019

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

@nyejon
Copy link

nyejon commented Jan 23, 2019

New pip version seems to have resolved this

@tijsg
Copy link

tijsg commented Jan 23, 2019

New pip version seems to have resolved this

For others reading this: this refers to version 19.0.1

Issue can be closed.

@ines ines closed this as completed Jan 23, 2019
@lock
Copy link

lock bot commented Feb 22, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
install Installation issues pip Issues related to the pip package manager third-party Third-party packages and services
Projects
None yet
Development

No branches or pull requests

4 participants