Gensim库Python 3.4的安装问题:http://www.lfd.uci.edu/~gohlke/python



我已经安装了两个python库:

  1. NumPy-1.10.4

  2. Scipy-0.17.0

这些是成功安装gensim所必需的,如:https://radimrehurek.com/gensim/install.html.我使用了来自http://www.lfd.uci.edu/~gohlke/pythonlibs/用于在带有python 3.4的windows7 64位计算机上安装。我遇到了某些兼容性问题。

   C:Users888537>py -m pip install gensim-0.12.4-cp34-none-win_amd64.whl         
   Processing c:users888537gensim-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 FilesPythonlibdistutilsdist.py:260: UserWarning: Unknown distribution option: 'install_requires'                                                   warnings.warn(msg)                                                            
   D:Program FilesPythonlibdistutilsdist.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"在C:\Users\888537\AppData\Local\Temp\pip-build-7zxq63k\smart-open\中失败,错误代码为1

在pip安装过程中也会发生同样的情况:

Command "python setup.py egg_info" failed with error code 1 in C:Users888537A
ppDataLocalTemppip-build-4o3kecbagensim

除了从git repo安装之外,还有什么办法可以解决这个问题吗?我也尝试从git repo导入失败。:P

C:Users888537>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

你能试试这个吗?

pip install --upgrade setuptools

然后

pip install gensim

我找到了问题的答案。pip包gensim未能安装,因为依赖项httpretty试图打印到非UTF-8区域设置,而依赖项SciPy未能找到OpenBLAS/Lapack库。参考:

我根据帖子尝试了修复此问题的步骤:Python SciPy需要BLAS吗?

然而,我决定转向Anaconda使用gensim库进行代码编程。

最新更新