Unable to get up and running with TextBlob

拥有回忆 提交于 2019-12-10 10:02:21

问题


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

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