安装python包
sudo pip install nltk
报错
sudo: pip: command not found
解决方法
检查是python2 还是python3
% pip3 -V pip 19.0.3 from(python 3.7)
用pip3安装
pip3 install nltk
出现错误
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/3.7' Consider using the `--user` option or check the permissions. You are using pip version 19.0.3, however version 22.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
更新版本
sudo pip3 install --upgrade pip



