PEX documentation and Makefile is unclear on supported Python versions #12809
-
I am unable to build a PEX file as described in the documentation. I am attempting to build the PEX file in a docker container for my version of Python (3.6). According to the Makefile, that version of Python is the default My docker-compose.yml version: '3.3'
services:
build:
image: python:3.6-bullseye
volumes:
- ./spaCy:/spacy
working_dir: /spacy
command: tail -f /dev/null The docker file exists in a directory with the SpaCy repo cloned into a folder
After launching through a Once the rust compiler is installed, run Even dropping the extras that I don't need still results in a failed build at the 'packaging' stage saying that Python3.6 is not supported. If there is a different version of SpaCy that supports python3.6, or a different method of packaging, I would greatly appreciate being pointed in the correct direction. Which page or section is this issue related to? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
The idea with the A word of warning about pex on linux with For our own internal use (again, linux-only), we recently switched from pex to |
Beta Was this translation helpful? Give feedback.
-
Let me move this to the discussion board... |
Beta Was this translation helpful? Give feedback.
-
For anyone interested in what I ended up doing: I'm not a Python Dev, so my knowledge of the ecosystem is pretty limited. I ended up finding Miniconda3 and using that to package up spacy for deployment. It allowed me to bundle a newer Python version as well as all the required SpaCy dependencies and models that I needed. |
Beta Was this translation helpful? Give feedback.
The idea with the
Makefile
is that you can setPYVER
andSPACY_EXTRAS
to the versions/packages that you need by setting env variables (or by editing theMakefile
).A word of warning about pex on linux with
torch>=1.12
: the default pypi torch 1.12+ (with nvidia libraries) does not appear to work at all in the pex file and in any case, the final pex file with spacy requirements will go beyond pex's hard 2GB filesize limit.For our own internal use (again, linux-only), we recently switched from pex to
python-appimage
. The setup is a little clunky because it assumes you need a desktop icon, etc., but otherwise I thought it was easy to get working. Put any models as requirements with github UR…