This repository was archived by the owner on Jul 24, 2024. It is now read-only.
This repository was archived by the owner on Jul 24, 2024. It is now read-only.
Package does not build with --use-pep517
(with Poetry) #79
Open
Description
The package does not build with pip using --use-pep517
with poetry. This is mainly an issue as the flag cannot be disabled with poetry (see python-poetry/poetry#3433).
A reproducible example is given below:
mkdir tmp
cd tmp
poetry init
# click through steps...
poetry add glmnet
> Using version ^2.2.1 for glmnet
>
> Updating dependencies
> Resolving dependencies... (0.1s)
>
> Writing lock file
>
> Package operations: 6 installs, 0 updates, 0 removals
>
> • Installing numpy (1.23.3)
> • Installing joblib (1.2.0)
> • Installing scipy (1.9.2)
> • Installing threadpoolctl (3.1.0)
> • Installing scikit-learn (1.1.2)
> • Installing glmnet (2.2.1): Failed
>
> CalledProcessError
>
> ...
>
> Installing build dependencies: started
> Installing build dependencies: finished with status 'done'
> Getting requirements to build wheel: started
> Getting requirements to build wheel: finished with status 'error'
> error: subprocess-exited-with-error
>
> × Getting requirements to build wheel did not run successfully.
> │ exit code: 1
> ╰─> [2 lines of output]
> install requires: 'numpy'. use pip or easy_install.
> $ pip install numpy
> [end of output]
The error comes from the beginning of the setup.py file:
Lines 12 to 18 in 813c06f
which seems to use this SO answer to compile the FORTRAN code from the original R package: https://stackoverflow.com/a/55358607/5861244
A solution in the short term is to call
poetry run python -m pip install glmnet --no-use-pep517
poetry add glmnet
as mentioned here: python-poetry/poetry#3433 (comment)
Versions for completness:
poetry run python --version
> Python 3.10.7
poetry --version
> Poetry (version 1.2.0)
Metadata
Metadata
Assignees
Labels
No labels