I was playing with the polyglot function to convert the text from one language to another like Spanish to English.
I was following the instructions to install the Polyglot and the required modules.
But while running the code
from polyglot.detect import Detector
I am getting this error:
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
from polyglot.detect import Detector
File "C:\Python34\lib\site-packages\polyglot-15.5.2-py3.4.egg\polyglot\detect\__init__.py", line 1, in <module>
from .base import Detector, Language
File "C:\Python34\lib\site-packages\polyglot-15.5.2-py3.4.egg\polyglot\detect\base.py", line 11, in <module>
from icu import Locale ImportError: No module named 'icu'
I'm not sure what I need to be doing.
Can anyone please help?
You need to install the libraries polyglot, PyICU and pycld2 with the commands:
pip install polyglot
pip install PyICU
pip install pycld2
You need to install https://github.com/ovalhub/pyicu
pip install pyicu
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With