简体   繁体   中英

Installation problems with Gensim library Python 3.4 : http://www.lfd.uci.edu/~gohlke/pythonlibs/

I have installed the 2 python libraries:

  1. NumPy - 1.10.4

  2. Scipy - 0.17.0

which are required for the successful installation of gensim as stated in: https://radimrehurek.com/gensim/install.html . I have used the wheel file from http://www.lfd.uci.edu/~gohlke/pythonlibs/ for installation on a windows 7 64 bit machine with python 3.4. I am running into certain compatibility issues.

   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'                                                                                                                               ---------------------------------------- 

Error:Command "python setup.py egg_info" failed with error code 1 in C:\\Users\\888537\\AppData\\Local\\Temp\\pip-build-7zxq63k_\\smart-open\\

The same occurs during a pip installation:

Command "python setup.py egg_info" failed with error code 1 in C:\Users\888537\A
ppData\Local\Temp\pip-build-4o3kecba\gensim\

Is there a way out of this other than installation from the git repo? I was unsuccessful trying to import from the git repo too. :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

Could you please try this?

pip install --upgrade setuptools

and then

pip install gensim

I found the answer to my question.The pip-package gensim failed to install because of the dependency httpretty trying to print to a non-UTF-8 locale and the dependency SciPy failing to find OpenBLAS/Lapack-Libraries. Reference:

I tried the steps to fix this as per the post: Does Python SciPy need BLAS?

However, I decided to shift to Anaconda for programming code with gensim library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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