phenomecentre / nPYc-Toolbox

The nPYc-Toolbox defines objects for representing, and implements functions to manipulate and display, metabolic profiling datasets.
MIT License
23 stars 8 forks source link

ImportError: cannot import name 'interp' from 'scipy' #112

Open kopeckylukas opened 4 months ago

kopeckylukas commented 4 months ago

Importing nPYc with scipy version 1.12.0 results in following error

ImportError: cannot import name 'interp' from 'scipy'

more information: https://github.com/mljar/mljar-supervised/issues/691 https://stackoverflow.com/questions/78008260/importerror-unable-to-import-interp-from-scipy-module#:~:text=The%20specific%20error%20message%20is,function%20within%20the%20SciPy%20library.

This scipy version was released on 20/01/2024 hence all new installations of nPYc toolbox will result in this error, especially for unexperienced Python users.

misch91 commented 4 months ago

As perfectly outlined in your attached thread, this should be resolved by changing the respective requirement.txt file line to scipy==1.11.4 and/or changing the setup.py

I also noticed some change in seaborn violin plot arguments (dropna is no longer an argument in those). A specific versioning here would probably help, too.

misch91 commented 3 months ago

FYI: Now, there is another package (networkx) that hinders importing the nPYc module. The latest running version for me was 3.2.1, therefore I suggest changing the respective lines in requirement.txt & setup.py files to: 'networkx==3.2.1'