kfuku52 / amalgkit

RNA-seq data amalgamation for a large-scale evolutionary transcriptomics
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

ModuleNotFoundError: No module named 'nltk' #9

Closed kfuku52 closed 4 years ago

kfuku52 commented 4 years ago

Hi Matthias: I got this error in using getfastq. Could you update setup.py and README for this new dependency?

Traceback (most recent call last):
  File "/home/kfuku/.pyenv/versions/miniconda3-4.3.30/bin/amalgkit", line 220, in <module>
    args.handler(args)
  File "/home/kfuku/.pyenv/versions/miniconda3-4.3.30/bin/amalgkit", line 28, in command_getfastq
    from amalgkit.getfastq import getfastq_main
  File "/home/kfuku/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/amalgkit/getfastq.py", line 2, in <module>
    from amalgkit.metadata import Metadata
  File "/home/kfuku/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/amalgkit/metadata.py", line 5, in <module>
    from nltk.stem import WordNetLemmatizer
ModuleNotFoundError: No module named 'nltk'
kfuku52 commented 4 years ago

Any update?

kfuku52 commented 4 years ago

Another error I just encountered in amalgkit metadata.

LookupError: 
**********************************************************************
  Resource wordnet not found.
  Please use the NLTK Downloader to obtain the resource:

  >>> import nltk
  >>> nltk.download('wordnet')

  For more information see: https://www.nltk.org/data.html

  Attempted to load corpora/wordnet

  Searched in:
    - '/Users/kf/nltk_data'
    - '/Users/kf/miniconda3/nltk_data'
    - '/Users/kf/miniconda3/share/nltk_data'
    - '/Users/kf/miniconda3/lib/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
**********************************************************************
Hego-CCTB commented 4 years ago

NLTK and obonet are now part of the setup.py requirements, I also moved 'import nltk' to the relevant function to avoid conflicts if NLTK is not installed. Also, 'wordnet' will now be downloaded and updated automatically, so the error should be resolved.