InstituteforDiseaseModeling / laser

Light Agent Spatial modeling for ERadication
MIT License
2 stars 5 forks source link

Installing via setup.py fails when running from a Python 3.8.10 environment #13

Closed AlLee-IDM closed 3 months ago

AlLee-IDM commented 7 months ago

My initial call to python3 -m pip install -e . failed with the following message (laser_allee is the root of my local repo):

Obtaining file:///mnt/data/malaria/synthetic_genomes/albert_projects/laser_allee Installing build dependencies ... done WARNING: Missing build requirements in pyproject.toml for file:///mnt/data/malaria/synthetic_genomes/albert_projects/laser_allee. WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'wheel'. Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Collecting click==8.1.7 Using cached click-8.1.7-py3-none-any.whl (97 kB) Collecting numba==0.58.1 Using cached numba-0.58.1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.7 MB) Collecting polars==0.19.19 Using cached polars-0.19.19-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28.5 MB) ERROR: Could not find a version that satisfies the requirement numpy==1.26.2 (from idmlaser==0.0.1) (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0rc1, 1.23.0rc2, 1.23.0rc3, 1.23.0, 1.23.1, 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0rc1, 1.24.0rc2, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.24.4) ERROR: No matching distribution found for numpy==1.26.2 (from idmlaser==0.0.1)

After updating to Python 3.9.19 (from 3.8.10), laser completed installation with no error messages. However, I had to pip install pandas and matplotlib manually in order to run engwal.py and test_userid.py successfully.

This occurred in the gc-eng-wal-model branch.

krosenfeld-IDM commented 7 months ago

Yeah, I think the pinned version of numpy (1.26.2) only supports python 3.9-3.12.

krosenfeld-IDM commented 7 months ago

now looking at the numpy 2.0.0. release notes. sent me down a rabbit hole!

clorton commented 3 months ago

@krosenfeld-IDM and @KevinMcCarthyAtIDM - end of support for 3.8 was in 2021 and absolute end of security fixes is in just a few months: https://en.wikipedia.org/wiki/History_of_Python#Table_of_versions Can we 1) agree we don't need to support 3.8 and 2) discuss and decide on what versions we will support going forward?

krosenfeld-IDM commented 3 months ago

I'm fine with 1 (good point re PEP). What are you thoughts regarding 2 @clorton?

clorton commented 3 months ago

I think all active versions is a reasonable starting point. That would be 3.9-3.12 right now.

Once we have more formalized testing in place, we should discuss what to do with Python versions in development (can we cleanly run tests for but ignore failures for pre-release versions?).

krosenfeld-IDM commented 3 months ago

That sounds good to me.

clorton commented 3 months ago

Closed "won't fix" as 3.8 is fully irrevocably unsupported in just a few months.