Having trouble installing NLTK and running it with Python 3

120 views
Skip to first unread message

Eric Quesada

unread,
Aug 4, 2016, 5:22:21 PM8/4/16
to nltk-users
Hi everyone. 

I'm trying to follow along with the book and know very little about computing in general, so please bear with me! 
I'm using a MacBook Air (Early 2014), version 10.10.5. It came with python 2.7.10 installed. 

Firstly, I ran the following in terminal  to install NLTK, which I had already done for a course I was taking:



sudo pip install -U nltk

The directory '/Users/equesada/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled.
Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

The directory '/Users/equesada/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled.
 check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Requirement already up-to-date: nltk in /Library/Python/2.7/site-packages

You are using pip version 8.0.2, however version 8.1.2 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.





I'm not sure how to check my permissions but it looks like I'm already up-to-date, right? 

I have no trouble importing nltk in python 2.7, but when I run 3.5, it gives me an import error which says there is no such module. 

Should I continue to use NLTK in python2.7? I'd like to be able use python3.

George Orton

unread,
Aug 4, 2016, 5:29:25 PM8/4/16
to nltk-...@googlegroups.com
Hi, If memory serves I believe you are looking for:

sudo pip3 install -U nltk

pip installs to Python 2.?, pip3 installs to Python 3.?
Enjoy, George

Reply all
Reply to author
Forward
0 new messages