NREL / floris

A controls-oriented engineering wake model.
http://nrel.github.io/floris
BSD 3-Clause "New" or "Revised" License
217 stars 156 forks source link

Potential need to update numpy version to 2.0 #1030

Open paulf81 opened 1 week ago

paulf81 commented 1 week ago

Potential need to update numpy version

I've been re-installing FLORIS/python following an OS update and received this error on install:

error: Failed to prepare distributions
  Caused by: Failed to download and build `numpy==1.24.4`
  Caused by: Build backend failed to determine requirements with `build_wheel()` (exit status: 1)

[stderr]
Traceback (most recent call last):
  File "<string>", line 8, in <module>
    from setuptools.build_meta import __legacy__ as backend
  File "/Users/pfleming/.cache/uv/builds-v0/.tmpbOAuSo/lib/python3.13/site-packages/setuptools/__init__.py", line 10, in <module>
    import distutils.core
ModuleNotFoundError: No module named 'distutils'
  Caused by: distutils was removed from the standard library in Python 3.12. Consider adding a constraint (like `numpy >1.24.4`) to avoid building a version of numpy that depends on distutils.

We use currently numpy~=1.20 which means we can jump up to v2. I think for now I can back myself to python 3.11 to get around this issue but wanted to flag the potential.

Proposed solution

Update numpy requirement to 2.0 and make any required changes