NLTK安装说目录不属于当前用户,并且要求已经是最新的



我正在尝试使用 sudo pip nltk 安装 nltk,但因错误而停止:

The directory /users/$username/library/caches/pip/http or its parent directory is 
not owned by the current user and the cache has been disabled. 
The directory /users/$username/Library/Caches/pip or its parent directory is 
not owned by the current user and caching wheels has been disabled. 
Requirement already satisfied: nltk in /Library/Python/2.7/site-packages (3.3)
Requirements already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from nltk) (1.4.1) 

显示了这些错误消息,我很困惑我是否已经拥有 nltk 并且是否是最新的。我检查了所有父目录的权限,并为所有目录提供了 drwx,所以我很困惑为什么该消息仍然显示。

请帮忙!我被困住了这个问题,我想我在某个时候搞砸了我的系统Python。

使用 sudo -H pip install -U nltk 解决了这个问题

最新更新