Why I can't pip install nltk on mac os?

两盒软妹~` 提交于 2021-02-17 05:10:11

问题


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

and try

sudo python -m pip install --upgrade nltk

But also result to same error like in this image

Or here in text:

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"

Is it because my python version (2.7) ? But in pip ntlk page it says also support 2.7

update:

pip install nltk success after running :

pip install --upgrade setuptools pip --user

回答1:


Start with upgrading installation tools:

pip install --upgrade setuptools pip


来源:https://stackoverflow.com/questions/58669318/why-i-cant-pip-install-nltk-on-mac-os

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!