Closed mar00nie closed 6 years ago
Looks like I have to run:
python setup.py build_ext pip install .
in the terminal each time before importing sent2vec in the notebook, even if it was already installed before.
Getting the same error and this is not working for me. The python module is not getting generated. I ran these commands and following file is being produced sent2vec.cpython-35m-x86_64-linux-gnu.so and sent to /usr/local/lib/python-3.5/dist-packages/
following is the log of pip3 install .
Processing /home/aum/ezDI/main_code/sent2vec Installing collected packages: sent2vec Running setup.py install for sent2vec ... done Successfully installed sent2vec-0.0.0
Try running the python script from inside the cloned Sent2vec package directory. That might help!
For those wishing to run a Python script from a working directory other than the cloned one, I found a work-around solution. Combining answers from @mar00nie and @SenNath:
cd <directory-of-cloned-sent2vec>
python setup.py build_ext --inplace
cp sent2vec.so <directory-of-your-own-script>
This will copy a local .so file to your script directory and Python will then find the model class.
This still is an issue.
Note that if you install sent2vec
using
$ pip install sent2vec
then you'll get the wrong package. This is because the package sent2vec
on PyPI is a totally different package with the same name.
The correct way of installing sent2vec
is to clone their repository here https://github.com/epfml/sent2vec and to follow the instructions in the README file
Hi, I used a new server to run the code in jupyter notebook and the line "model = sent2vec.Sent2vecModel()" produces the error "module 'sent2vec' has no attribute 'Sent2vecModel'" once again. This time recloning the repository doesn't work anymore. And yes I reinstalled Cython but it doesn't help.