lapjv
lapjv copied to clipboard
Installation fail -- requirements are invalid
The current setup.py
lists:
install_requires=["numpy>=1.0.0"],
tests_require=["scipy>=1.0.0"],
setup_requires=["numpy>=1.20.0"],
This means pip
will try to install the current version on lapjv
even if numpy
is older than 1.20. It will build against numpy 1.20, install it in your environment with older numpy, and import lapjv
will fail with:
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: numpy.core.multiarray failed to import
Please sync install_requires
with setup_requires
as building with one version and running with another does NOT work.
It appears this has already been fixed by 32c7108d40c1ea30dfa9d9115642fee901e8afbf in 1.3.14
but pip will just grab 1.3.13
because it will think that version is compatible with any numpy. Maybe 1.3.13
should be yanked? That would help a lot with those of us using numpy<1.20
.
This is the problem that I caught in my own production today, let's fix this.
NP with yanking 1.3.13, but won't the story repeat with 1.3.12, 1.3.11, etc.?
I don't think so, the problem was introduce by #21 right before 1.3.13. Previous versions used build requirement numpy>=1.0.0 and install requirement numpy>=1.0.0, so they matched.
The metadata is out of sync again, setup.py says install_requires=["numpy>=1.20.0"]
and pyproject.toml says requires = ["numpy>=1.21.0"]