Open cpoptic opened 4 years ago
@cpoptic thank you for reporting the problem. Probably we should update the scikit-learn
version in requirements. Will look at it.
@cpoptic I've updated the sklearn in requirements. Could you please install mljar-supervised
in version 0.7.0? It should help. I'm closing the issue for now. If you will get still get errors please feel free to reopen.
I was able to solve this but the issue was your requirements.txt has scipy version 1.4, which is not compatible with scikit-learn 0.23.2 That version of sklearn requires scipy 1.5.2
The pip install mljar-supervised
command still causes the aforementioned parameter is incorrect
error when subsequently importing sklearn and scipy.
However, cloning the repo, and running python install setup.py
ended up installing it correctly and the libraries are able to be imported without error.
I'd recommend updating the requirements.txt
from scipy 1.4 to 1.5, as that was the root of the error.
I've updated scipy
to 1.5.2 as you wrote.
Thank you for your help!
@cpoptic you won't belive:
error: scipy 1.5.2 is installed but scipy==1.4.1; python_version >= "3" is required by {'tensorflow'}
I don't know what to do:
scikit-learn 0.23.2 needs scipy 1.5.2
tensorflow 2.2.0 needs scipy 1.4.1 (old dependency from tests)
I was trying to upgrade tensorflow to 2.3.0 but it breaks the current Neural Network implementation (looks like 2.3.0 is not backward compatible with 2.2.0)
Please any idea what to do? (Maybe move NN implementation to PyTorch or just use MLP implementation from scikit-learn??? but this will require a lot of coding)
Ha welcome to the world of dependency hell!
I would not use scikit-learn for NN functionality when Keras+TF are much better. One possible solution is to wait for TF 2.4, which could fix the 2.3.0 version issue.
Although it appears TF 2.2.0 is working when installed alongside supervised:
>>> import tensorflow as tf
>>> tf.__version__
'2.2.0'
>>> import supervised
>>> import scipy
>>> import sklearn
>>> supervised.__version__
'0.7.1'
>>> scipy.__version__
'1.5.2'
>>> sklearn.__version__
'0.23.2'
Installation of mljar-supervised downgrades scikit-learn from 0.23 to 0.22, which does not import properly with the other dependencies.
pip install mljar-supervised
But this sequence fixes it:
pip uninstall mljar-supervised
pip uninstall scikit-learn
pip install -U scikit-learn
pip install -U scipy
Fixes this by reinstalling scikit-learn 0.23.2 and scipy 1.5.2 and enables scikit-learn to be imported properly once again.
$ python Python 3.7.9 (default, Aug 31 2020, 17:10:11) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information.