adobe / NLP-Cube

Natural Language Processing Pipeline - Sentence Splitting, Tokenization, Lemmatization, Part-of-speech Tagging and Dependency Parsing
http://opensource.adobe.com/NLP-Cube/index.html
Apache License 2.0
550 stars 93 forks source link

ModuleNotFoundError when launching NLP-Cube #134

Closed musitoph closed 2 years ago

musitoph commented 2 years ago

Hello.

I want to use NLP-Cube analysis in a Python tool. I have installed NLP-Cube with pip install cube. It did install successfully.

The code I have used is as follows:

from cube.api import Cube
cube=Cube(verbose=True)
cube.load("fr")

When running it, I get the error:

Traceback (most recent call last): File "prog.py", line 1, in from cube.api import Cube File "C:\Users\musitoph\AppData\Local\Programs\Python\Python37-32\lib\site-packages\cube__init__.py", line 1, in from api import * ModuleNotFoundError: No module named 'api'

I have tested this on two computers, one with Windows 10 and one with Windows Server 2019.

Am I doing something wrong?

Thank you in advance for your answer.

Best regards.

tiberiu44 commented 2 years ago

Hi @musitoph ,

The package name should be nlpcube. Please try pip install nlpcube. Also, if this does not work, try installing on a Linux VM. We have not done any tests on Windows machines, but I don't see why there should be any issues.

musitoph commented 2 years ago

Hello @tiberiu44 ,

Thank you for the fast reply! Indeed, I just tried to install NLP-Cube using pip install nlpcube and now it works fine. Thanks very much!

I had followed a tutorial from a friend to install and use NLP-Cube and that's where the pip install cube comes from.

Thank you again for your help!