没有名为textblob的模块(在mac上)

时间:2017-10-31 00:46:47

标签: python python-3.x textblob

我一直在尝试在我的Mac上安装textblob,但我一直在收到错误。

我按照https://github.com/sloria/TextBlob

中的说明操作

用于安装包装 我跑线

$ pip install -U text blob

我的终端返回

Requirement already up-to-date: textblob in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Requirement already up-to-date: nltk>=3.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from textblob)
Requirement already up-to-date: six in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from nltk>=3.1->textblob

然后我跑了

$ python3 -m textblob.download_corpora

我的电脑返回

/Library/Frameworks/Python.framework/Versions/3.6/bin/python3: Error while finding module specification for 'textblob.download_corpora' (ModuleNotFoundError: No module named 'textblob')

我查看了这篇文章Unable to get up and running with TextBlob并确保我没有名为text或textblob的文件,所以现在我不知道还能做什么。有人能帮我吗 ?

2 个答案:

答案 0 :(得分:1)

textblob和Python版本之间可能存在断开的链接。

尝试跑步:

void producerer(std::vector<int>& v);
void consumer(std::vector<int>& v);

std::vector<int> numbers;
std::thread t(producer, std::ref(numbers));
std::thread t2(consumerer, std::ref(numbers));

答案 1 :(得分:1)

TextBlob也可以作为conda包提供。要使用conda进行安装,请运行

$ conda install -c https://conda.anaconda.org/sloria textblob
$ python -m textblob.download_corpora