为什么我不能在Mac OS上点安装nltk?
我正在使用macOS mojave,安装python 2.7并使用 python get-pip.py
安装pip,我已经尝试使用这些命令来安装pip了:
I'm using mac os mojave, install python 2.7 and install pip using python get-pip.py
, I already try those command to install pip :
pip install --upgrade pip
pip install nltk
然后尝试
sudo python -m pip install --upgrade nltk
但是也会导致相同的错误,例如此图像
But also result to same error like in this image
或在此处输入文字:
nltk设置命令中的错误:"install_requires"必须为字符串或包含有效项目/版本要求的字符串列表说明符;singledispatch 中的预期版本规范;python_version<3.4"在;python_version<"3.4"
error in nltk setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in singledispatch; python_version < "3.4" at ; python_version < "3.4"
是因为我的python版本(2.7)吗?但是在pip ntlk页面中,它说也支持2.7
Is it because my python version (2.7) ? But in pip ntlk page it says also support 2.7
更新:
pip install nltk
成功:
pip install --upgrade setuptools pip --user
从升级安装工具开始:
pip install --upgrade setuptools pip