Error when using the command "from polyglot.detect import Detector"

时间:2015-07-28 16:46:21

标签: python polyglot

i am a beginner in python and 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 when in run the command "from polyglot.detect import Detector" i am getting any error

Traceback (most recent call last): File "", line 1, in 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 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 from icu import Locale ImportError: No module named 'icu'

not sure what i need to be doing.

Can anyone please help?

1 个答案:

答案 0 :(得分:1)

您需要使用以下命令安装库polyglot,PyICU和pycld2:

pip install polyglot
pip install PyICU
pip install pycld2