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

Import of LanguageDetectorBuilder failed #30

Closed
geritwagner opened this issue Apr 8, 2022 · 4 comments
Closed

Import of LanguageDetectorBuilder failed #30

geritwagner opened this issue Apr 8, 2022 · 4 comments

Comments

@geritwagner
Copy link

When loading the LanguageDetectorBuilder as recommended in the readme, I received the following error:

from lingua import LanguageDetectorBuilder
...
ImportError: cannot import name 'LanguageDetectorBuilder' from 'lingua'

The following worked for me:

from lingua.builder import LanguageDetectorBuilder

@pemistahl
Copy link
Owner

Hi Gerit, thanks for reaching out to me.

I'm not able to reproduce your problem. The import from lingua import LanguageDetectorBuilder works fine for me. Which Python version are you using? In which exact context are you trying to import the library? Without more information, I cannot help you.

@geritwagner
Copy link
Author

Hi Peter,

I am using Python 3.8.10 with lingua-language-detector==1.0.1. Not sure why it throws this error. The package setup seems to be ok...

@pemistahl
Copy link
Owner

I close this issue now. There is not enough information to help you. If you get a clue what might be wrong, feel free to re-open this issue and provide your findings. Thank you.

@Lv101Magikarp
Copy link

I ran into this issue because somehow I had the lingua package installed at the same time as the desired lingua-language-detector package and python was importing the wrong one.

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

3 participants