问题
This morning I set out to install the TextBlob module found at https://textblob.readthedocs.org/en/latest/index.html
Per the installation documentation I first ran:
pip install -U textblob
Now if I run that command I get the following:
Requirement already up-to-date: textblob in /Library/Python/2.7/site-packages/textblob-0.5.0-py2.7.egg
Requirement already up-to-date: PyYAML in /Library/Python/2.7/site-packages (from textblob)
Cleaning up...
While it would appear to be installed, when I try to run a one line file (wherein the only line is from text.blob import TextBlob
I am told ImportError: No module named blob
So then I tried to install from git, first I cloned the repository and then I ran both of the following snippets
sudo python setup.py install
and
sudo python2.7 setup.py install
Unfortunately neither one of those commands solved my issue. So now im stuck. I suppose the best course of action is to start over but im pretty much lost.
回答1:
As Blender pointed out in his comments above, my problem was with a text.py file in the same directory that I was trying to run TextBlob. The deletion of this file led to the fixture of my issue.
Thank you Blender.
来源:https://stackoverflow.com/questions/18174482/unable-to-get-up-and-running-with-textblob