简体   繁体   English

如何从anaconda提示符安装gensim?

[英]How to install gensim from anaconda prompt?

When I put the following command in anaconda prompt当我在 anaconda 提示符下输入以下命令时

conda install -c anaconda gensim

Python stops working and shows the following error message: Python 停止工作并显示以下错误消息:

在此处输入图片说明

How do I deal with this problem?我该如何处理这个问题?

I usually in stall gensim using pip on anaconda prompt using the following command我通常使用以下命令在 anaconda 提示符下使用pip来停止gensim

pip install -U gensim

or simply或者干脆

pip install gensim

as shown in the anaconda documentation .anaconda documentation所示。

As per the documentation https://anaconda.org/anaconda/gensim根据文档https://anaconda.org/anaconda/gensim

install it by安装它

conda install -c anaconda gensim 

It might take a while to solving the environment解决环境可能需要一段时间

My solution is for Windows 10, Anaconda.我的解决方案适用于 Windows 10,Anaconda。 Where I want to use gensim with Spyder.我想在 Spyder 中使用 gensim 的地方。

Solution: Use Anaconda Navigator, and install package from there: Open Anaconda Navigator -> Environments (base) -> not installed (packages) -> (search for) gensim -> check the gensim option from the drop down list-> Press apply button -> (wait for a while, it will search other dependencies, then press the button one more time to install required package)解决方案:使用 Anaconda Navigator,并从那里安装包:打开 Anaconda Navigator -> Environments (base) -> not installed (packages) -> (search for) gensim -> 从下拉列表中检查 gensim 选项 -> 按应用按钮->(稍等片刻,会搜索其他依赖,再按一次按钮安装需要的包)

Scree shot of Anaconda Navigator Anaconda Navigator 的屏幕截图

History: On anaconda command prompt, using conda command, I installed gensim.历史:在 anaconda 命令提示符下,使用 conda 命令,我安装了 gensim。 Every thing looks perfect but it was even not imported, "import gensim", in command prompt.每件事看起来都很完美,但它甚至没有在命令提示符下导入,“导入 gensim”。

Bonus: Same is true for tensorflow奖励:张量流也是如此

You need to go through the conda-forge channel.您需要通过 conda-forge 通道。 Try running尝试跑步

conda install -c conda-forge gensim

I tried your command on Windows with conda version 4.4.10, and it installed with success.我在使用 conda 版本 4.4.10 的 Windows 上尝试了您的命令,并且安装成功。

Try to updating to the latest version, as suggested in the comments.按照评论中的建议,尝试更新到最新版本。 Also if that doesn't work (it happened to me with other modules), try from the Anaconda prompt: pip install -U gensim .For me it worked for other occasions.此外,如果这不起作用(我遇到了其他模块),请尝试从 Anaconda 提示: pip install -U gensim 。对我来说,它适用于其他场合。

And the last solution is to download the archive version and build it yourself locally.最后一个解决方案是下载存档版本并在本地自行构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM