2

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
Anindita Bhowmik
  • 844
  • 1
  • 10
  • 18
  • Why you cannot just `pip install gensim`? I've tried it right now and I got gensim==0.12.4 – Paul Apr 29 '16 at 14:10
  • The error I got during the pip installation is: Command "python setup.py egg_info" failed with error code 1 in C:\Users\888537\A ppData\Local\Temp\pip-build-4o3kecba\gensim\ – Anindita Bhowmik Apr 29 '16 at 14:44

2 Answers2

0

Could you please try this?

pip install --upgrade setuptools

and then

pip install gensim
Paul
  • 6,641
  • 8
  • 41
  • 56
  • Hello Paul, "python setup.py egg_info" failed with error code 1 in C:\Users\888537\A ppData\Local\Temp\pip-build-4o3kecba\gensim\" is the error code which terminates the installation of the gensim package using pip. Hence, the pip installation is not successful. – Anindita Bhowmik May 02 '16 at 06:17
-1

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.

Community
  • 1
  • 1
Anindita Bhowmik
  • 844
  • 1
  • 10
  • 18
  • In Anacondas the gensim library installed successfully with a single statement "conda install gensim" which installed httpretty printer and all related files for the successful installation of gensim at one shot. – Anindita Bhowmik May 05 '16 at 14:41