Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'nltk' #9

Closed
kfuku52 opened this issue Dec 20, 2019 · 3 comments
Closed

ModuleNotFoundError: No module named 'nltk' #9

kfuku52 opened this issue Dec 20, 2019 · 3 comments
Assignees

Comments

@kfuku52
Copy link
Owner

kfuku52 commented Dec 20, 2019

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
Copy link
Owner Author

kfuku52 commented Jan 14, 2020

Any update?

@kfuku52
Copy link
Owner Author

kfuku52 commented Jan 14, 2020

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
Copy link
Collaborator

Hego-CCTB commented Jan 22, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants