Reputation: 2089
If I run python -m textblob.download_corpora
, it will download the corpora in C:\Users\{my user name}\AppData\Roaming\nltk_data
folder and I will not have any issues using TextBlob in the global environment in VS Code.
However, if I go in a Pipenv environment, launch VS Code from there, and try to use TextBlob, it keeps saying LookupError: run python -m textblob.download_corpora
So, it seems like the virtual env is the reason. I copied the nltk_data
folder containing the corpora that the downloader creates to the virtual env folder. I then tried following this and set the NLTK_DATA to that folder but it made no difference.
How should I make TextBlob run in a virtual environment understand where to look in for the downloaded corpora?
Upvotes: 0
Views: 56