【问题标题】:Issues installing gensim on Ubuntu在 Ubuntu 上安装 gensim 的问题
【发布时间】:2017-07-28 22:40:22
【问题描述】:

我正在尝试在我的 Ubuntu 上用 Python 安装 gensim。我尝试使用easy_install,但出现错误。有人可以帮助找出问题所在吗?

easy_install

easy_install -U gensim

Running scipy-0.19.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-    QXO1dA/scipy-0.19.1/egg-dist-tmp-AxijnA
/tmp/easy_install-QXO1dA/scipy-0.19.1/setup.py:323: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates 

warnings.warn("Unrecognized setuptools command, proceeding with "                                                                 /usr/local/lib/python2.7/dist-packages/numpy/distutils/system_info.py:572: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found.                                                                     
Directories to search for the libraries can be specified in the                                                                     numpy/distutils/site.cfg file (section [atlas]) or by setting                                                                       the ATLAS environment variable.    

self.calc_info()                                                                                                                    
/usr/local/lib/python2.7/dist-packages/numpy/distutils/system_info.py:572: UserWarning:                                                 
Lapack (http://www.netlib.org/lapack/) libraries not found.                                                                          
Directories to search for the libraries can be specified in the                                                                     
numpy/distutils/site.cfg file (section [lapack]) or by setting                                                                      
the LAPACK environment variable.                                                                                                  
self.calc_info()                                                                                                                  
/usr/local/lib/python2.7/dist-packages/numpy/distutils
/system_info.py:572: UserWarning:                                                   
Lapack (http://www.netlib.org/lapack/) sources not found.                                                                           
Directories to search for the sources can be specified in the                                                                       
numpy/distutils/site.cfg file (section [lapack_src]) or by setting                                                                  
the LAPACK_SRC environment variable.                                                                                              
self.calc_info()                                                                                                                  
Running from scipy source directory.                                                                                                
non-existing path in 'scipy/integrate': 'quadpack.h'                                                                                
Warning: Can't read registry to find the necessary compiler setting                                                                 
Make sure that Python modules _winreg, win32api or win32con are  installed.                                                          
error: no lapack/blas resources found

谢谢

【问题讨论】:

  • 通常最好使用虚拟环境和'pip'安装工具,它可以避免在你的系统Python中混合包,并自动处理依赖关系。或者,类似地,conda 工具也可以创建环境,然后将conda install [PACKAGE]pip install [PACKAGE] 放入这些环境中。 (我更喜欢 miniconda 变体。)

标签: python python-2.7 gensim


【解决方案1】:

必须升级 Scipy...按照 josteinb 在以下线程中的答案中给出的解决方案:

Can't upgrade Scipy

能够按如下方式升级 scipy:

sudo apt-get build-dep python-scipy
sudo pip install --upgrade scipy

在此之后,gensim 的 easy_install 运行顺利

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-04-20
    • 2017-09-26
    • 2015-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多