安装:
-
进入http://www.lfd.uci.edu/~gohlke/pythonlibs/
-
下载对应的版本:如python3.6,64位Windows操作系统,应该下载numpy-1.13.1+mkl-cp36-cp36m-win_amd64.whl,scipy-0.19.1-cp36-cp36m-win_amd64.whl和gensim-2.3.0-cp36-cp36m-win_amd64.whl包。
-
安装下载包的顺序分别安装包,注意顸序丌能改变。安装命令:
pip install gensim #没设置清华源的话,.直接指定清华源下载更快 #pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 模块名 Pip install ***.whl文件
遇到问题:
- twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.
spacy 2.0.16 has requirement regex==2018.01.10, but you’ll have regex 2019.6.5 which is incompatible.
jupyterlab-server 1.0.0 has requirement jsonschema>=3.0.1, but you’ll have jsonschema 2.6.0 which is incompatible.
解决: 下载/安装 twisted 18.7.0 requires PyHamcrest
- 安装 Twisted-19.10.0-cp38-cp38-win_amd64的时候遇到问题 :
ERROR: Twisted-19.10.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
解决1 :
List item进入python命令行,输入 :
import pip._internal
print(pip._internal.pep425tags.get_supported())
我用解决1又产生了个问题,
module ‘pip._internal’ has no attribute ‘pep425tags’
是说我python 3.x版本不能用2.x的语句,so :
解决2 :
import wheel.pep425tags as w
print(w.get_supported())
在Windows上安装gensim时,需要从http://www.lfd.uci.edu/~gohlke/pythonlibs/下载numpy、scipy和gensim的whl文件。安装顺序必须正确。在安装过程中遇到了依赖冲突,比如twisted、spacy和jupyterlab-server的版本不匹配问题。为解决这些问题,需要下载并安装缺失或不兼容的库,但安装Twisted-19.10.0时遇到了不支持的wheel错误。解决方法包括查看系统支持的wheel格式或检查Python版本是否兼容。
7653

被折叠的 条评论
为什么被折叠?



