>>>import nltk
Traceback (most recent call last):
File "D:projectLibsite-packagesnltkcorpusutil.py", line 84, in __load
root = nltk.data.find(f"{self.subdir}/{zip_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:projectLibsite-packagesnltkdata.py", line 579, in find
raise LookupError(resource_not_found
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.zip/wordnet/
Searched in:
- 'C:\Users\me/nltk_data'
- 'D:\project\nltk_data'
- 'D:\project\share\nltk_data'
- 'D:\project\lib\nltk_data'
- 'C:\Users\me\AppData\Roaming\nltk_data'
- 'C:\nltk_data'
- 'D:\nltk_data'
- 'E:\nltk_data'
**********************************************************************
Basically – I cannot import nltk because wordnet is missing, but in order to download wordnet, I have to import nltk which I cannot, because wordnet is missing etc.
Noteworthy is, that it throws this exception twice, but with a different traceback –
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:projectLibsite-packagesnltk__init__.py", line 156, in <module>
from nltk.stem import *
File "D:projectLibsite-packagesnltkstem__init__.py", line 34, in <module>
from nltk.stem.wordnet import WordNetLemmatizer
File "D:projectLibsite-packagesnltkstemwordnet.py", line 13, in <module>
class WordNetLemmatizer:
File "D:projectLibsite-packagesnltkstemwordnet.py", line 48, in WordNetLemmatizer
morphy = wn.morphy
^^^^^^^^^
File "D:projectLibsite-packagesnltkcorpusutil.py", line 120, in __getattr__
self.__load()
File "D:projectLibsite-packagesnltkcorpusutil.py", line 86, in __load
raise e
File "D:projectLibsite-packagesnltkcorpusutil.py", line 81, in __load
root = nltk.data.find(f"{self.subdir}/{self.__name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:projectLibsite-packagesnltkdata.py", line 579, in find
raise LookupError(resource_not_found)
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:
- 'C:\Users\me/nltk_data'
- 'D:\project\nltk_data'
- 'D:\project\share\nltk_data'
- 'D:\project\lib\nltk_data'
- 'C:\Users\me\AppData\Roaming\nltk_data'
- 'C:\nltk_data'
- 'D:\nltk_data'
- 'E:\nltk_data'
**********************************************************************
What is the suggested solution in this case? No others I have seen have this issue.