安装TextBlob时出现非零返回代码错误

2024-06-25 23:30:15 发布

您现在位置:Python中文网/ 问答频道 /正文

我一直在尝试安装Python TextBlob,但遇到以下错误:

Now downloading textblob packages
[localhost] run: python -m textblob.download_corpora
[localhost] out: /home/naren/VirtualEnvironment/bin/python: No module named textblob
[localhost] out:

Fatal error: run() received nonzero return code 1 while executing!

Requested: python -m textblob.download_corpora
Executed: /bin/bash -l -c "cd /home/naren/VirtualEnvironment && source bin/activate && python -m textblob.download_corpora"

Aborting.
Disconnecting from localhost... done.
run() received nonzero return code 1 while executing!


Tags: runlocalhosthomereturnbindownloadcodeout
1条回答
网友
1楼 · 发布于 2024-06-25 23:30:15

您如何运行此安装?哪个操作系统?在

textblob主页提供以下简短的安装说明:

$ pip install -U textblob
$ python -m textblob.download_corpora

因为你得到了这个错误:

^{pr2}$

我猜第二部分(下载数据文件)在没有第一部分(安装模块)的情况下运行,或者第一部分以某种方式失败了。在

尝试使用上述命令重新安装,或using conda

$ conda config  add channels https://conda.binstar.org/sloria
$ conda install textblob
$ python -m textblob.download_corpora

当然,您需要install Anaconda才能让Conda运行。在

相关问题 更多 >