python.cannot import name 'TextBlob'

alexlu3211 picture alexlu3211 · Jun 10, 2015 · Viewed 10.7k times · Source

I was trying to import TextBlob into Python.

When I run the command directly inside shell, it works pretty well: from textblob import TextBlob

However, when I put it into the py file and run it, it doesn't work anymore, it says:

ImportError: cannot import name 'TextBlob'

Please help me out with it, so desperate right now...Thanks a lot

Answer

Fenglin Han picture Fenglin Han · Sep 17, 2017

I encountered the same problem, solved it by deleting any file starting with test*, text* in the same folder.