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

C extension not loaded, training will be slow. Install a C compiler and reinstall gensim for fast training. #2726

Closed
gmnabeel opened this issue Jan 15, 2020 · 6 comments
Labels
need info Not enough information for reproduce an issue, need more info from author

Comments

@gmnabeel
Copy link

gmnabeel commented Jan 15, 2020

Im trying to run naive-bayes.py from the following file(https://github.com/rockash/Fake-news-Detection) but i get the error mentioned in the title, i have tried uninstalling gensim and reinstalling it again using both pip and conda but nothing seems to work.i also have mingw installed and have added /bin to path as the warning suggests but it doesnt work either.I'm using windows 10 64 bit
Screenshot (2)

@piskvorky piskvorky added the need info Not enough information for reproduce an issue, need more info from author label Jan 15, 2020
@piskvorky
Copy link
Owner

Can you show the console output from when you installed Gensim? Did your installation use the binary Windows wheel?

@gmnabeel
Copy link
Author

I'm sorry this is my first issue that i have raised, what more details do you need?

Problem : The gensim is showing c extension not loaded.
But i have installed all necessary packages and mingw is also installed and the versions are above in the picture

@gmnabeel
Copy link
Author

Can you show the console output from when you installed Gensim? Did your installation use the binary Windows wheel?

Yes i used pip install gensim and conda install gensim later on after uninstalling pip version

@gojomo
Copy link
Collaborator

gojomo commented Jan 17, 2020

Your console output shows you are using Python 3.8; gensim build/testing for that Python version isn't yet working on our project's (Appveyor-based) Windows test environment, for unknown reasons, so the same thing is probably affecting you.

Until that's fixed, you should have better luck with Python 3.7.

Personally I'd suggest for Windows users:

  • using a conda-based installation, and specifically creating an environment based on Python 3.7. (I prefer to install just what's needed via the miniconda approach.) For example, create your working environment with conda create --name my_working_environment python=3.7, then activate it in the usual way.
  • then inside the activated environment, installing major prerequisite packages that the conda team keeps up-to-date via conda install PKGNAME - such as numpy, scipy, sklearn, jupyter, etc
  • then installing gensim into that same environment using pip install gensim - as the conda repository's version often lags

@gojomo
Copy link
Collaborator

gojomo commented Jan 17, 2020

(Specifically the Python 3.8 Appveyor failure is described in , and visible in the CI links from, this PR/PR-comment: #2715 (comment). I suspect it's actually a problem with one of the packaging, build, or prerequisite libraries we depend on not yet being 3.8-ready, and so may resolve itself in time as more of the Python world fully tests with Python 3.8 on Windows. In the meantime we may want to add an official note that gensim-on-Python-3.8-on-Windows is not yet an officially recommended/supported combination.)

@gojomo
Copy link
Collaborator

gojomo commented Jan 27, 2020

Closing assuming recommendation to use Python 3.7 on WIndows worked.

@gojomo gojomo closed this as completed Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need info Not enough information for reproduce an issue, need more info from author
Projects
None yet
Development

No branches or pull requests

3 participants