title: NLTK was unable to find stanford-postagger.jar! Set the CLASSPATH environment variable
body: <p>I am working on a project that requires me to tag tokens using nltk and python. So I wanted to use this. But came up with a few problems.
  I went through a lot of other already asked questions and other forums but I was still unable to get a soultion to this problem.
  The problem is when I try to execute the following:</p>
  
  <hr>
  
  <p><code>from nltk.tag import StanfordPOSTagger
   st = StanfordPOSTagger('english-bidirectional-distsim.tagger')</code></p>
  
  <hr>
  
  <p>I get the following:</p>
  
  <hr>
  
  <pre><code>    Traceback (most recent call last):
  
      `File "&lt;pyshell#13&gt;", line 1, in &lt;module&gt;
          st = StanfordPOSTagger('english-bidirectional-distsim.tagger')`
  
      `File "C:\Users\MY3\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk-3.1-py3.5.egg\nltk\tag\stanford.py", line 131, in __init__
          super(StanfordPOSTagger, self).__init__(*args, **kwargs)`
  
      `File "C:\Users\MY3\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk-3.1-py3.5.egg\nltk\tag\stanford.py", line 53, in __init__
          verbose=verbose)`
  
       `File "C:\Users\MY3\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk-3.1-py3.5.egg\nltk\internals.py", line 652, in find_jar
          searchpath, url, verbose, is_regex))`
  
       `File "C:\Users\MY3\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk-3.1-py3.5.egg\nltk\internals.py", line 647, in find_jar_iter
          raise LookupError('\n\n%s\n%s\n%s' % (div, msg, div))`
  
      LookupError: 
  
      ===========================================================================
        NLTK was unable to find stanford-postagger.jar! Set the CLASSPATH
        environment variable.
  
      ===========================================================================
  </code></pre>
  
  <p>I already set the 
  CLASSPATH - <code>C:\Users\MY3\Desktop\nltk\stanford\stanford-postagger.jar</code>
  I tried it as <code>C:\Users\MY3\Desktop\nltk\stanford</code> as well..</p>
  
  <p>STANFORD_MODELS - <code>C:\Users\MY3\Desktop\nltk\stanford\models\</code></p>
  
  <p>I tried doing this as well..in vain
  <code>File "C:\Python27\lib\site-packages\nltk\tag\stanford.py", line 45, in __init__
  env_vars=('STANFORD_MODELS',), verbose=verbose)</code>
  but it doesn't solve the problem either. Please Help me in solving this issue.</p>
  
  <p>I use Windows 8, python 3.5 and nltk 3.1</p>