我安装了2个python库:
NumPy - 1.10.4
Scipy - 0.17.0
是成功安装gensim所必需的,如:https://radimrehurek.com/gensim/install.html中所述。我使用http://www.lfd.uci.edu/~gohlke/pythonlibs/的wheel文件安装在带有python 3.4的Windows 7 64位机器上。我遇到了某些兼容性问题。
C:\Users\888537>py -m pip install gensim-0.12.4-cp34-none-win_amd64.whl
Processing c:\users\888537\gensim-0.12.4-cp34-none-win_amd64.whl
Collecting numpy>=1.3 (from gensim==0.12.4)
Using cached numpy-1.11.0-cp34-none-win_amd64.whl
Collecting smart-open>=1.2.1 (from gensim==0.12.4)
Using cached smart_open-1.3.2.tar.gz
Complete output from command python setup.py egg_info:
D:\Program Files\Python\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg)
D:\Program Files\Python\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info' ----------------------------------------
错误:命令“python setup.py egg_info”失败,错误代码1在C:\ Users \ 888537 \ AppData \ Local \ Temp \ pip-build-7zxq63k_ \ smart-open \
在pip安装期间也是如此:
Command "python setup.py egg_info" failed with error code 1 in C:\Users\888537\A
ppData\Local\Temp\pip-build-4o3kecba\gensim\
除了从git repo安装之外,还有其他方法吗?我试图从git repo导入也没有成功。 :P
C:\Users\888537>py -m pip install -e git+ssh://git@github.com/piskvorky/gensim.g
it
--editable=git+ssh://git@github.com/piskvorky/gensim.git is not the right format
; it must have #egg=Package
答案 0 :(得分:0)
你能试试吗?
pip install --upgrade setuptools
然后
pip install gensim
答案 1 :(得分:-1)
我找到了我的问题的答案。由于依赖httpretty尝试打印到非UTF-8语言环境而且依赖关系SciPy无法找到OpenBLAS / Lapack-Libraries,因此pip-package gensim无法安装。 Reference:
我按照帖子尝试了修复此问题的步骤: Does Python SciPy need BLAS?
但是,我决定转移到Anaconda,使用gensim库编写代码。