简体   繁体   English

ImportError:没有名为“ gensim”的模块

[英]ImportError: No module named 'gensim'

I have installed gensim for Windows by the command: 我已经通过以下命令为Windows安装了gensim:

conda install -c anaconda gensim 康达安装-c anaconda gensim

I have an environment py35. 我有一个环境py35。 I'm trying to run a Python script using the import statement: from gensim.models import Word2Vec where there is an error ImportError: No module named 'gensim' . 我正在尝试使用import语句运行Python脚本: from gensim.models import Word2Vec ,其中有错误ImportError: No module named 'gensim' Any idea what to be done? 知道该怎么做吗?

You need to install the package as it does not come with Python. 您需要安装该软件包,因为它不是Python随附的。 This will do the job: 这将完成工作:

pip install --upgrade gensim

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

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