I cant import textblob package

2020-05-01 04:37发布

问题:

I installed textblob using the command pip install. But now I am trying to import it and I get the following error:

ModuleNotFoundError: No module named 'textblob'

I am using Spyder in a windows 10 system

from textblob import TextBlob

C:\Users\Diego>pip install textblob Requirement already satisfied: textblob in c:\users\diego\appdata\local\programs\python\python36-32\lib\site-packages (0.15.2) Requirement already satisfied: nltk>=3.1 in c:\users\diego\appdata\local\programs\python\python36-32\lib\site-packages (from textblob) (3.4) Requirement already satisfied: six in c:\users\diego\appdata\local\programs\python\python36-32\lib\site-packages (from nltk>=3.1->textblob) (1.11.0) Requirement already satisfied: singledispatch in c:\users\diego\appdata\local\programs\python\python36-32\lib\site-packages (from nltk>=3.1->textblob) (3.4.0.3)

回答1:

I dont know why but the solution was to install textblob from the spyder console using:

!pip install textblob