I'm running python 2.7.13 under windows 10 and I'm struggling to get nltk properly running.
Here's what happens when I try to import nltk:
>>> import nltk
Traceback (most recent call last):
File "<pyshell#4>", line 2, in <module>
import nltk
File "C:\Python27\lib\site-packages\nltk-3.2.3-py2.7-win32.egg\nltk\__init__.py", line 128, in <module>
from nltk.chunk import *
File "C:\Python27\lib\site-packages\nltk-3.2.3-py2.7-win32.egg\nltk\chunk\__init__.py", line 157, in <module>
from nltk.chunk.api import ChunkParserI
File "C:\Python27\lib\site-packages\nltk-3.2.3-py2.7-win32.egg\nltk\chunk\api.py", line 13, in <module>
from nltk.parse import ParserI
File "C:\Python27\lib\site-packages\nltk-3.2.3-py2.7-win32.egg\nltk\parse\__init__.py", line 81, in <module>
from nltk.parse.corenlp import CoreNLPParser, CoreNLPDependencyParser
File "C:\Python27\lib\site-packages\nltk-3.2.3-py2.7-win32.egg\nltk\parse\corenlp.py", line 17, in <module>
import requests
ImportError: No module named requests
The following packages are installed:
- cycler 0.10.0
- functools32 3.2.3.post2
- matplotlib 2.0.2
- nltk 3.2.3
- numpy 1.12.1
- pyparsing 2.2.0
- python-dateutil 2.6.0
- pytz 2017.2
- PyYAML 3.12
- six 1.10.0
I have already tried to uninstall nltk and also uninstalled and reinstalled python and then I followed these instructions: http://lizusefulstuff.blogspot.de/2012/03/how-to-install-nltk-package-for-python.html
However, with these instructions I get stuck with step 5. When I enter
python -m nltk.downloader
I get the message
C:\Python27\python.exe: No module named requests
Does anyone have a hint what I'm doing wrong here or what else I could try to get nltk running in my setup? I assume there is still a way to use nltk with python 2.7?
From what I found so far, it seems easier to install nltk with python 3.4 but I'd like to avoid a python upgrade, if possible, since aside from my nltk experiments I'm following along a coding tutorial that refers to python 2.7.
Thank you for any hints!