Make sure that that the following code has been run on the appropriate Python environment. It will download all the resource required by NLTK, including the corpora:
import nltk
# To choose what to download use: nltk.download()
nltk.download("all")