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

ImportError: No module named _emd #8

Open
bwang482 opened this issue Feb 14, 2017 · 6 comments
Open

ImportError: No module named _emd #8

bwang482 opened this issue Feb 14, 2017 · 6 comments

Comments

@bwang482
Copy link

bwang482 commented Feb 14, 2017

Why is that I keep getting "ImportError: No module named _emd" error from emd.py? I use python 2.7.

May I ask what is '_emd' ? I assume it's not the same as pyemd?

Thanks in advance for your time!

@bwang482 bwang482 changed the title Wrong type error occurs in wmd/wmd.py ImportError: No module named _emd Feb 14, 2017
@serenayj
Copy link

serenayj commented Apr 5, 2017

I've got the same issue. I traced back to wmd.py, it turned out that the Python.h is not found in emd.h. Someone could help?

@2ayan
Copy link

2ayan commented Nov 10, 2017

me too.

wmd> python wmd.py SMERP_only_text.pk SMERP_only_text_wmd.pk
Traceback (most recent call last):
File "wmd.py", line 4, in
from emd import emd
File "python-emd-master/emd.py", line 25, in
_emd = swig_import_helper()
File "python-emd-master/emd.py", line 17, in swig_import_helper
import _emd
ImportError: No module named _emd

@YuTingLiu
Copy link

you can use pyemd instead, which gensim using this package too.
pip install pyemd

@zimengq
Copy link

zimengq commented Apr 18, 2018

you should first build emd in python-master-emd

@rebecca-zhang
Copy link

rebecca-zhang commented Oct 23, 2018

Has anyone come across a solution to this? When I run build in python-emd-master, I get the error
Linking wrapper library '_emd.so'. -n ld -shared -o _emd.so emd.o emd_wrap.o ld: unknown option: -shared make: *** [_emd.so] Error 1 rm emd_wrap.o emd.o emd_wrap.c
So it looks like emd isn't being built properly

@gocen
Copy link

gocen commented Aug 22, 2019

I've installed swig and build emd with 'make' command
but it still gives the error

ImportError: No module named _emd

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

7 participants