问题
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