tschuelia / PyPythia

Lightweight python library for predicting the difficulty of alignments in phylogenetics
GNU General Public License v3.0
16 stars 0 forks source link

sklearn compatibility issues #2

Closed mdlakic closed 2 years ago

mdlakic commented 2 years ago

I like this program a lot, but it doesn't work out of the box. This is despite having pandas, sklearn and biopython installed. I think the main reason is the sklearn version incompatibility. On one computer I have sklearn==0.23.1 and that one complains about not having sklearn.ensemble._forest which is basically because it is too old. I think it would help if scikit-learn==1.0.2 is added to the setup as a requirement. This is what ultimately worked for me:

conda create -n pythia -c conda-forge python=3.8
conda activate pythia
git clone https://github.com/tschuelia/PyPythia.git
cd PyPythia
pip install -e .
pip install scikit-learn==1.0.2

Also, the example gives a score of 0.14 rather than 0.12 and the line is mistyped (it should be examples/example.phy instead of examples/exmple.phy).

tschuelia commented 2 years ago

Hello, thanks for checking out Pythia and reporting the issues :-) I fixed the spelling error and added the version requirement for sklearn to >= 1.0, I checked that with version 1.0 it still works

I wrote the example when I had an older version of the predictor, that is the reason for the mismatch in scores, but since that might be confusing, I updated this as well.

BenoitMorel commented 2 years ago

Hi Julia, Maybe you could also indicate a minimum python version. I couldn't install PyPhythia with python 3.6 (because of scikit-learn) but it worked with python 3.7. Benoit

tschuelia commented 2 years ago

That is in the setup already, but I allowed 3.6, and you are right, only 3.7 and higher is allowed. I will change that immediately, thanks for pointing it out :-)

BenoitMorel commented 2 years ago

Thanks ;-) In addition, I had to install importlib-metadata and to upgraft numpy from 1.17.2 to 1.17.3 Now it seems to work!