ebranlard / pyDatView

A crossplatform GUI to plot tabulated data from files (e.g. CSV, Excel, OpenFAST, HAWC2, Flex...), or python pandas dataframes
MIT License
109 stars 43 forks source link

breaking changes in numpy 2.x, avoiding it for now #187

Closed mayankchetan closed 1 month ago

mayankchetan commented 3 months ago

Error importing numpy.core.multiarray in numpy 2.x is causing pydativew to break.

https://numpy.org/devdocs/numpy_2_0_migration_guide.html#numpy-lib-namespace

ebranlard commented 3 months ago

Hi Mayank, thanks for posting this. Currently, I can't reproduce your error, my guess is that there are some inconsistencies in your packages that pip didn't resolve. pyDatView is not importing multiarray, it might be another package that is importing it.

Can you show the error that pops up?

From the root of the pydatview repository, you can delete all dependencies: pip uninstall -y -r requirements.txt

and then reinstall them: pip install -r requirements.txt numpy>2

On my machine, I can have python 3.11, with numpy 2.01 and pandas 2.2.2 and pyDatView seems to run fine.

If it's an issue for others I'm fine doing that, but i prefer to stay away from version specific dependencies as much as possible, and instead adapt the code to support multiple versions.

mayankchetan commented 3 months ago

You are right. It looks like re-installing the dependencies helps. I'm pretty sure the env I had for pyDatView was quite old.

Thank you for the latest updates! Awesome as always! 😄

Please reject this PR 😊