epfml / sent2vec

General purpose unsupervised sentence representations
Other
1.19k stars 256 forks source link

Fixing the mac build #62

Open yasonk opened 5 years ago

yasonk commented 5 years ago

A few issues were created for mac builds: https://github.com/epfml/sent2vec/issues/60 https://github.com/epfml/sent2vec/issues/48

This code allowed me to install sent2vec using pip install . Most of the code is copied from https://github.com/facebookresearch/fastText/blob/master/setup.py, but had to also remove the rt library.

mpagli commented 5 years ago

Thanks for the PR! I'll do some tests and come back to you hopefully by next Monday.

yasonk commented 5 years ago

Not sure if it worked I'm getting a new error when I import and so far cannot resolve it: In py36

import sent2vec
ImportError: dynamic module does not define module export function (PyInit_sent2vec)

In py27

ImportError: dynamic module does not define init function (initsent2vec)
mpagli commented 5 years ago

I pulled your code and had the same issue on Ubuntu. Any luck on your side?

yasonk commented 5 years ago

No, the only thing that I found was that the issue is not cython to python version issue (which seems to be the case here because both py2 and py3 are having the same issue). The only other time that people were able to resolve this issue was cython pulling invalid dependencies and generating a corrupted module (or something like that).

kgarg8 commented 3 years ago

For me, the Mac build error got resolved by adding -std=libc++ to the compile-options as shown in the below link:

https://stackoverflow.com/questions/53809584/issues-about-installing-pcl-in-my-computer