I should have introduced myself when I posted the first time. Sorry.
I am a retired university professor. I have taught NLP for a good 30 years, but never using NLTK. Now that is coming my way too. I wanted to install the latest version, but ran into an error, described in my preceding message:
= = = = = = = =
[...] I want to install NLTK (version 3.2.3, the newest and best?) on a Mac running the latest system 10.12.5. Installation seems to work (what you see is the second run of pip, so everything apparently is already in place). There is, however, an import error. What am I doing wrong? Thanks!
$ sudo -H pip install -U nltk
Password:
Requirement already up-to-date: nltk in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Requirement already up-to-date: six in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from nltk)
$ python3
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/nltk/__init__.py", line 128, in <module>
from nltk.chunk import *
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/nltk/chunk/__init__.py", line 157, in <module>
from nltk.chunk.api import ChunkParserI
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/nltk/chunk/api.py", line 13, in <module>
from nltk.parse import ParserI
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/nltk/parse/__init__.py", line 81, in <module>
from nltk.parse.corenlp import CoreNLPParser, CoreNLPDependencyParser
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/nltk/parse/corenlp.py", line 17, in <module>
import requests
ImportError: No module named 'requests'
>>>
= = = = = = = =
I kind of suspect version 3.2.3, because as soon as I reverted to version 3.2.1, everything worked like a charm.
Cheers,
Stan