Frage

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.

War es hilfreich?

Lösung

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.

Andere Tipps

For anyone else, who may have this issue, I had another virtual environment open in my VS Code terminal (conda) that was not the same virtual environment I installed the textblob package in. Switched over and all was good.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top