lapjv icon indicating copy to clipboard operation
lapjv copied to clipboard

Installation fail -- requirements are invalid

Open remram44 opened this issue 3 years ago • 5 comments

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.

remram44 avatar Dec 17 '21 17:12 remram44

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.

remram44 avatar Dec 17 '21 17:12 remram44

This is the problem that I caught in my own production today, let's fix this.

vmarkovtsev avatar Mar 21 '22 09:03 vmarkovtsev

NP with yanking 1.3.13, but won't the story repeat with 1.3.12, 1.3.11, etc.?

vmarkovtsev avatar Mar 21 '22 10:03 vmarkovtsev

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.

remram44 avatar Mar 21 '22 13:03 remram44

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"]

remram44 avatar Jul 08 '22 16:07 remram44