Testing GenSim installation

2,037 views
Skip to first unread message

Richard Evans

unread,
Apr 4, 2014, 5:47:08 AM4/4/14
to gen...@googlegroups.com

Forgive me but I’m a complete beginner with both Python and GenSim (I haven’t written any code for many years so I’m afraid I’m also unfamiliar with IDEs)

To set up Python on my PC I first installed Enthought Canopy 64 bit. I’ve entered a few  lines of code and it appears to be running fine (Windows 7)

------

I then had some difficulty installing gensim

At the DOS command line the command easy­_install  gensim failed to install anything

I read the article in your Knowledge Base “Installing packages into Canopy User Python from the OS command line, checked the version of Canopy that I had just downloaded and found that it was 1.3

So I followed the instructions in the article and entered pip install –upgrade setuptools

That resulted in uninstalling of setuptools 0.6.49 from Canopy and the installation of easy_install 2.7 in Canopy


-----

I then gave the Dos command easy_install gensim

That appears to have installed gensim (Last message was “Finished processing dependencies for gensim”)  But it did give two warnings “no files found matching’*.sh under directory ‘_’   And “  “no previously included directories found matching ‘docs\src*’

I then tried to check whether gensim is working properly  by typing setup.py test in the Canopy editor but it just gives a syntax error. Same syntax if I type python setup.test at the Windows DOS Command level.

 

When I check the directory structure the GenSim entry is at C:\Users\Richard\App Data\Local\Enthought\Canopy\User\Lib\site-packages\gensim-0.9.0-py2.7.egg\gensim It contains 6 directories (Corpora thro Test) and 6 .pyc files each with an associated Canopy document

 

Any advice on where to go next ?

Radim Řehůřek

unread,
Apr 4, 2014, 6:09:22 AM4/4/14
to gen...@googlegroups.com
Hello Richard,

the warnings are no problem, I think your installation is fine.

You can run setup.py when you're installing gensim from the sources (.tar.gz). If you installed with easy_install, the setup.py file is not installed (I think).

Try launching python (just type "python" into cmd line when at C:\), and then:

>>> import gensim

and if that works without an error, you're good to go :)

Best,
Radim
Message has been deleted

Richard Evans

unread,
Apr 4, 2014, 6:33:25 AM4/4/14
to gen...@googlegroups.com
Wow - thanks for the rapid reply.  import gensim at C:\ python level results in >>> response.   import gensim within the Canopy editor results in
 %run C:/Users/Richard/AppData/Local/Enthought/Canopy/User/Lib/site-packages/gensim-0.9.0-py2.7.egg/gensim/__init__.py

Does that look right ?

I'm assuming that I can follow your tutorial entering the code in the Canopy editor. Is that correct ?

Richard

Radim Řehůřek

unread,
Apr 4, 2014, 9:58:40 AM4/4/14
to gen...@googlegroups.com
I don't know what Canopy editor is, but if it's a place to enter and execute Python code -- yes :)

Have fun,
Radim
Reply all
Reply to author
Forward
0 new messages