Installing Gensim on Windows.

4,039 views
Skip to first unread message

Nigel Legg

unread,
Mar 21, 2012, 11:56:03 AM3/21/12
to gen...@googlegroups.com
Hi all.  I have python with nltk installed on my Windows 7 desktop machine, and now want to install genSim to do some topic modelling.
However I'm stuck with this, the documentation does not really help for windows. 
Any tips?
Regards, Nigel.

--
Regards,
Nigel Legg
07722 652866
http://twitter.com/nigellegg
http://uk.linkedin.com/in/nigellegg

Radim Řehůřek

unread,
Mar 21, 2012, 4:21:32 PM3/21/12
to gensim
Nigel,

where are you stuck?

For windows, the documentation recommends installing Enthought first:
http://radimrehurek.com/gensim/install.html

Then run `easy_install gensim` from command line, or unpack the source
and run `python setup.py install`

Best,
Radim

Nigel Legg

unread,
Mar 22, 2012, 2:53:00 AM3/22/12
to gen...@googlegroups.com
I've done that, but it's bombing out at the ATLAS / Blas step. Do I need to install all of this, or are there parts I can leave out?
Thanks, Nigel.

Radim Řehůřek

unread,
Mar 22, 2012, 4:43:13 AM3/22/12
to gensim
On Mar 22, 7:53 am, Nigel Legg <nigel.l...@gmail.com> wrote:
> I've done that, but it's bombing out at the ATLAS / Blas step. Do I need to
> install all of this, or are there parts I can leave out?
> Thanks, Nigel.

You mean installing Enthought fails? Then drop them a note -- they're
a commercial company, I'm sure they'll be grateful for bug reports and
offer you support.

For gensim, you don't need to install anything apart from Python,
NumPy and SciPy -- for Windows, all 3 are conveniently bundled in
Enthought, which is why I recommend it.

Best,
Radim


Nigel Legg

unread,
Mar 22, 2012, 4:47:14 AM3/22/12
to gen...@googlegroups.com
I haven't tried enthought because I already have Python and Numpy (beebn using nltk for a while). I thought it was bombing at the ATLAS step, realised this is optional (right?) and tried trunning gensim - it did not load because the install had not installed scipy for some reason.  Installed that, decided to forget about ATLAS, and I can use it now.  Will be trying LDA, LSI, and HDP over the next few days on the same data set.
Thanks for taking the time,
Cheers, N.

Jurica Seva

unread,
Feb 2, 2013, 1:51:41 PM2/2/13
to gen...@googlegroups.com
EPD is available for Linux as well under the academic license.

What worked for me (working from the command line; i have a comman-line VM with ubuntu, no GUI): 
1. Installed EPD free; i used links to go to epd's home page and then downloaded epd_free-7.3-2-rh5-x86_64.sh
2. changed .bashrc (from ~ directory)with vim and added export PATH=/home/jseva/epd_free-7.3-2-rh5-x86_64/bin:$PATH where /home/jseva/epd_free-7.3-2-rh5-x86_64 is the location where I installed EPD
3. run  enpkg --userpass and login with my EPD account
4. enpkg epd upgrades from free to academic

After upgared, when i run python i get

Enthought Python Distribution -- www.enthought.com
Version: 7.3-2 (64-bit)

Python 2.7.3 |EPD 7.3-2 (64-bit)| (default, Apr 11 2012, 17:52:16)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "credits", "demo" or "enthought" for more information.

Runing easy_install gensim gives

Installed /home/jseva/epd_free-7.3-2-rh5-x86_64/lib/python2.7/site-packages/gensim-0.8.6-py2.7.egg

and in this manner you can install all python packages you need; it will use the edp version, not the default one. 

Hope this helps someone. I lost 3 weeks trying to figure out how to set up OpenBLAS and then ATLAS and reinstalled my VM 2 times... And lost faith in google :D 

Best,
Jurica.

Mihai Szekely

unread,
Jun 27, 2013, 9:26:07 AM6/27/13
to gen...@googlegroups.com
You wouldn't believe the trouble i've been to get it to work on windows (XPsp3)
From manually installing easy_install, numpy, scipy (thorugh an unofficial installer because of some blas library error) and only after gensim, it was painfully. Because Enthought didn help at all :( On ubuntu it was piece of cake :D

Reshma Okkath Kavil

unread,
Mar 25, 2014, 10:46:16 AM3/25/14
to gen...@googlegroups.com
I've installed python 2.7 numpy and scipy in windows. Now inorder to install gensim, when i run setup.py

python setup.py, i get the following errors.


Traceback (most recent call last):
  File "G:\gensim-0.9.0.tar\dist\gensim-0.9.0\setup.py", line 20, in <module>
    ez_setup.use_setuptools()
  File "G:\gensim-0.9.0.tar\dist\gensim-0.9.0\ez_setup.py", line 132, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "G:\gensim-0.9.0.tar\dist\gensim-0.9.0\ez_setup.py", line 110, in _do_download
    to_dir, download_delay)
  File "G:\gensim-0.9.0.tar\dist\gensim-0.9.0\ez_setup.py", line 290, in download_setuptools
    downloader(url, saveto)
  File "G:\gensim-0.9.0.tar\dist\gensim-0.9.0\ez_setup.py", line 197, in download_file_curl
    _clean_check(cmd, target)
  File "G:\gensim-0.9.0.tar\dist\gensim-0.9.0\ez_setup.py", line 160, in _clean_check
    subprocess.check_call(cmd)
  File "C:\Python27\lib\subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['curl', 'https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz', '--silent', '--output', 'G:\\gensim-0.9.0.tar\\dist\\gensim-0.9.0\\setuptools-1.3.2.tar.gz']' returned non-zero exit status 60

What do i need to do inorder to install Gensim successfully in windows ? 

Please help me.

janre...@gmail.com

unread,
Mar 25, 2014, 4:48:33 PM3/25/14
to gen...@googlegroups.com
Looks like something went wrong when gensim tried to download the setuptools package.
You could try installing setuptools manually. Download the setuptools.tar.gz, extract it, open a command window and change directory to the extracted folder, then run
python setup.py install
Then follow the same procedure with the gensim.tar.gz.

Radim Řehůřek

unread,
Mar 25, 2014, 6:30:18 PM3/25/14
to gen...@googlegroups.com
Hello,

this is not connected to gensim -- ez_setup.py (the "setuptools bootstrap script") tried to download setuptools with curl, and found some SSL certificate was invalid (=error code 60).

Not sure how that comes about, but like Jan says, you can download and install setuptools manually.

Once you have that, you can use "easy_install" command to install Python packages (including gensim), no need to download/unzip sources manually.

HTH,
Radim

Reshma Okkath Kavil

unread,
Mar 26, 2014, 1:00:25 PM3/26/14
to gen...@googlegroups.com
Hi Jan and Radim,

Thankyou for replying.

I had tried that, but did not install setuptools. Now when i tried installing setuptools [using python setup.py install], gensim installation is also working fine.

Thanks a lot.

Regards,
Reshma
Reply all
Reply to author
Forward
0 new messages