spaCy: Install via `requirements.txt` documentation doesn't work
The docs state I can specify the model like this in requirements.txt:
spacy>=3.0.0,<4.0.0
en_core_web_sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.4.0/en_core_web_sm-3.4.0-py3-none-any.whl
This attempts to download spacy 3.4.4.
And a VERY long series of exceptions like this is raised:
45.29 thinc/backends/numpy_ops.cpp:2408:34: error: ‘_PyCFrame’ {aka ‘struct _PyCFrame’} has no member named ‘use_tracing’
45.29 2408 | (unlikely((tstate)->cframe->use_tracing) &&\
45.29 | ^~~~~~~~~~~
45.29 thinc/backends/numpy_ops.cpp:1001:43: note: in definition of macro ‘unlikely’
45.29 1001 | #define unlikely(x) __builtin_expect(!!(x), 0)
45.29 | ^
45.29 thinc/backends/numpy_ops.cpp:2513:15: note: in expansion of macro ‘__Pyx_IsTracing’
45.29 2513 | if (__Pyx_IsTracing(tstate, 0, 0)) {\
45.29 | ^~~~~~~~~~~~~~~
45.29 thinc/backends/numpy_ops.cpp:46877:3: note: in expansion of macro ‘__Pyx_TraceReturn’
45.29 46877 | __Pyx_TraceReturn(Py_None, 1);
45.29 | ^~~~~~~~~~~~~~~~~
All my attempts so far to cache Spacy’s download by specifying the model in requirements.txt have failed (see replies below).
Context: I’m installing this in Docker. Python image is python:3.12.1-slim
About this issue
- Original URL
- State: open
- Created 5 months ago
- Comments: 17 (5 by maintainers)
Commits related to this issue
- Update example that shows model in requirments See #13293. — committed to danieldk/spaCy by danieldk 5 months ago
- Update example that shows model in requirments (#13302) See #13293. — committed to explosion/spaCy by danieldk 5 months ago
- Update example that shows model in requirments (#13302) See #13293. — committed to explosion/spaCy by danieldk 5 months ago
@danieldk hmm, I’d suspected that this could be related to the fact I’m doing this inside a Docker container. Or maybe I didn’t try this exact combination. Will do in a bit and update.