Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not being able to get a FAST VERSION of Gensim #1329

Closed
Chanchal-Hasan opened this issue May 16, 2017 · 10 comments
Closed

Not being able to get a FAST VERSION of Gensim #1329

Chanchal-Hasan opened this issue May 16, 2017 · 10 comments

Comments

@Chanchal-Hasan
Copy link

Chanchal-Hasan commented May 16, 2017

Description

I have installed the C compiler, set path variable, installed cython, and then upgrade the gensim. But still I am not geting the FAST VERSION of gensim. Can you guys help me to find what I am missing here.

Steps/Code/Corpus to Reproduce

from gensim.models.word2vec import FAST_VERSION
FAST_VERSION

Expected Results

1

Actual Results

-1

Versions

Cython version 0.25.2
Python version 2.7.13
gensim version 2.0.0
scipy version 0.18.1

@prakhar2b
Copy link
Contributor

@Chanchal-Hasan please check that there is a word2vec_inner.so file generated after installation. There must be a compilation error.

@gojomo
Copy link
Collaborator

gojomo commented May 16, 2017

What operating system are you using? How are you installing gensim, and are you installing into a virtual environment? Are there any errors shown when you install gensim?

(When using pip install gensim, with the required system development tools available, you usually won't even need cython to be installed. Similarly, if using a conda-based environment, conda install gensim won't need cython, either.)

@tmylk
Copy link
Contributor

tmylk commented May 16, 2017

we have wheels for windows and osx that come with pre-compiled C, so there FAST_VERSION should be 1

@Chanchal-Hasan
Copy link
Author

@prakhar2b I have not found any such .so file. I could see the .pxd, .pyx., and .c extensions of word2vec_inner

@Chanchal-Hasan
Copy link
Author

Hi @gojomo I am in Windows7, and not installing into any virtual env. I have downloaded and unzipped the tar.gz source for gensim and installed through "python setup.py install", and no errors shown. Actually gensim is working fine, except that parallelizing word2vec is not happening.

@tmylk I have not found any such wheels. Can you help me where can I get that.

@gojomo
Copy link
Collaborator

gojomo commented May 17, 2017

On Windows, using the 'conda' packager and alternate Python distribution from Continuum Analytics is often a good choice, as they handle many Windows-specific compilations/optimizations well. It's a free product from a commercial entity. (Also both preferring installations from 'pip'/PyPI, and using project-specific vertual environments, are good habits to get into unless you have strong reasons for preferring other approaches.)

I tend to use the 'miniconda' variant to only install the minimum number of packages I need.) Separately, Windows7 is a bit on the old side – still getting security updates but a couple years' past Microsoft offering any free 'mainstream' support – so some things may work better in a later version.

(And, if ever configuring a machine specifically for this kind of work, the underlying stack – from Python itself through libraries to gensim – is all much more extensively developed/tested/used on Linux machines, so usually set-up and troubleshooting will be easiest if you can choose that OS.)

@tmylk
Copy link
Contributor

tmylk commented May 17, 2017

@Chanchal-Hasan please try installing with pip install gensim that will download the pre-compiled wheels from PyPi.

@Chanchal-Hasan
Copy link
Author

Hi @gojomo , thank you for your follow up on this. However, the problem is, due to the firewall protection, I cannot use Conda on this occasion.

@Chanchal-Hasan
Copy link
Author

Chanchal-Hasan commented May 17, 2017

Hi @tmylk I have done that but only with following results. Looks like timeout happening due to firewall dropping packets directly being sent to pypi server. Can yo help me how can I resolve this.

image

@menshikh-iv
Copy link
Contributor

@Chanchal-Hasan firewall isn't related with gensim.
About FAST_VERSION: try to re-install gensim from pip pip uninstall gensim; pip install gensim, or alternative variant - use conda forge package

conda config --add channels conda-forge
conda install gensim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants