Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't use the nltk wordnet lemmatizer because I can't download the wordnet corpus on my university computer due to access rights issues.

I get the following error when I try to do so:

**********************************************************************   Resource 'corpora/wordnet' not found.  Please use the NLTK   Downloader to obtain the resource:  >>>   Searched in:
    - '/home/XX/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'

When I had the same issue at home, I could resolve it by two ways:

  1. Using, the standard way and
  2. Creating a new folder at location /home/XX/nltk_data and just pasting the corpus directory inside it.

Now at the university I only have access to /home/XX/bin and not /home/XX directly. So is there anyway I could paste the wordnet corpus into /home/XX/bin and then somehow make nltk look for the corpus in that folder?

share|improve this question

It seems that you need to set the environment variable "NLTK_DATA" to tell NLTK where to look.

share|improve this answer
import nltk;

Now, is a list of locations where to search for the modules. You can just do:"your location/directory");
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.