patrickwest / EukRep

Classification of Eukaryotic and Prokaryotic sequences from metagenomic datasets
MIT License
66 stars 12 forks source link

ModuleNotFoundError #14

Closed Ahmed-Shibl closed 2 years ago

Ahmed-Shibl commented 3 years ago

Hi EukRep developers, Thanks for this useful tool! I've been trying to use EukRep on a metagenomic assembly but I keep running into an error.

Here's the command I used:

EukRep -i ~/miniconda3/envs/spades/M6-coral_assembly/scaffolds.fasta -o ~/miniconda3/envs/eukrep/M6-coral/Eukrep_output_spades_M6.fa --prokarya ~/miniconda3/envs/eukrep/M6-coral/Prok_output_spades_M6.fa

And this is the error I keep getting:

Traceback (most recent call last):
  File "~/miniconda3/bin/EukRep", line 17, in <module>
    EukRep.main(args)
  File "~/miniconda3/lib/python3.8/site-packages/EukRep/EukRep.py", line 37, in main
    model = pickle.load(args.model)
ModuleNotFoundError: No module named 'sklearn.svm.classes'

Running pip install scikit-learn gives me this:

Requirement already satisfied: scikit-learn in ~/miniconda3/lib/python3.8/site-packages (0.24.1)
Requirement already satisfied: numpy>=1.13.3 in ~/miniconda3/lib/python3.8/site-packages (from scikit-learn) (1.20.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in ~/miniconda3/lib/python3.8/site-packages (from scikit-learn) (2.1.0)
Requirement already satisfied: joblib>=0.11 in ~/miniconda3/lib/python3.8/site-packages (from scikit-learn) (1.0.1)
Requirement already satisfied: scipy>=0.19.1 in ~/miniconda3/lib/python3.8/site-packages (from scikit-learn) (1.6.1)
Requirement already satisfied: numpy>=1.13.3 in ~/miniconda3/lib/python3.8/site-packages (from scikit-learn) (1.20.1)

Any ideas on how to get around this, @patrickwest?

Thanks in advance

carolinasuarez commented 3 years ago

I had the same issue. Downgrading scikit-learn seems to work pip install scikit-learn==0.19.2

fulaibaowang commented 3 years ago

I also had the ModuleNotFoundError issue and it occurred an error when I downgraded the scikit-learn. Now I installed Eukrep in a conda environment and it worked. conda install Eukrep

rotoscan commented 2 years ago

I suggest the use of a conda environment like so:

conda create -y -n eukrep-env -c bioconda scikit-learn==0.19.2 eukrep