-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Can't import gensim in Windows #2309
Comments
My conda list output, for a detailed look on versions:
|
Hi @ibrahimsharaf, try to uninstall numpy, scipy and gensim and install gensim again |
Same problem? @menshikh-iv
|
I have the same exact problem running Python 3.6 on a docker container with Django + Gensim. Gensim==3.6.0 Steps to replicate
Stack Trace
|
+1 |
@Vichoko sorry, it works for me (no exceptions). Can you try to uninstall |
@menshikh-iv Minimum reproducible case on my end: Dockerfile
app.py
Compile & Run (which should yield the numpy error):
|
I uninstalled numpy, scipy, gensim and reinstalled gensim again using |
+1 |
We have similar problem with our setup:
everything in a docker setup, pip requirements installed from a file. Could the issue be related to a pip cache? |
@ibrahimsharaf @adibo @Gilgames000 @piercefreeman @acapello @Vichoko here I see several problems
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-_w1jwmfi/gensim/gensim/models -I/usr/local/include/python3.7m -I/tmp/pip-install-_w1jwmfi/gensim/.eggs/numpy-1.16.0rc2-py3.7-linux-x86_64.egg/numpy/core/include -c ./gensim/models/word2vec_inner.c -o build/temp.linux-x86_64-3.7/./gensim/models/word2vec_inner.o
In file included from /tmp/pip-install-_w1jwmfi/gensim/.eggs/numpy-1.16.0rc2-py3.7-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1822:0,
from /tmp/pip-install-_w1jwmfi/gensim/.eggs/numpy-1.16.0rc2-py3.7-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-install-_w1jwmfi/gensim/.eggs/numpy-1.16.0rc2-py3.7-linux-x86_64.egg/numpy/core/include/numpy/arrayobject.h:4,
from ./gensim/models/word2vec_inner.c:567:
/tmp/pip-install-_w1jwmfi/gensim/.eggs/numpy-1.16.0rc2-py3.7-linux-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with " \ i.e.
so, the question - why that happens? If anybody has some ideas - please let me know! |
Workarounds for (2)
|
In that case, I close this issue, if workarounds don't help - feel free to re-open and fill the issue with new details. |
I tried all 2 workarounds and got the same errors.
In this case i tried this in a docker image running in ubuntu. Edit: After some time playing with the dockerfile finally made it. |
Description
I have a problem importing gensim, I use Anaconda in Windows (separate virtualenv), find below the traceback and the dependencies versions.
Steps/Code/Corpus to Reproduce
import gensim
Actual Results
Versions
Windows-10-10.0.15063-SP0
Python 3.7.1
NumPy 1.15.4
SciPy 1.2.0
gensim 3.6.0
The text was updated successfully, but these errors were encountered: