aboSamoor / polyglot

Multilingual text (NLP) processing toolkit
http://polyglot-nlp.com
Other
2.29k stars 337 forks source link

ModuleNotFoundError: No module named 'pycld2' #197

Closed PoeteMaudit closed 5 years ago

pabloab commented 4 years ago

I just tried polyglot and get this issue... should I create a new one?

pablo /tmp $ sudo -H pip install polyglot
Collecting polyglot
  Downloading polyglot-16.7.4.tar.gz (126 kB)
     |████████████████████████████████| 126 kB 3.8 MB/s 
Building wheels for collected packages: polyglot
  Building wheel for polyglot (setup.py) ... done
  Created wheel for polyglot: filename=polyglot-16.7.4-py2.py3-none-any.whl size=55714 sha256=398c019f025b57869f0a07df908425a9805013213179c6255237f1bdca972eda
  Stored in directory: /root/.cache/pip/wheels/99/d9/0e/2e76da7ea1f5713a3b70f4b4d81a84111030d0bc39fb8905ba
Successfully built polyglot
Installing collected packages: polyglot
Successfully installed polyglot-16.7.4

pablo /tmp $ cat /tmp/atext | polyglot detect
Traceback (most recent call last):
  File "/usr/local/bin/polyglot", line 5, in <module>
    from polyglot.__main__ import main
  File "/usr/local/lib/python3.6/dist-packages/polyglot/__main__.py", line 19, in <module>
    from polyglot.detect import Detector
  File "/usr/local/lib/python3.6/dist-packages/polyglot/detect/__init__.py", line 1, in <module>
    from .base import Detector, Language
  File "/usr/local/lib/python3.6/dist-packages/polyglot/detect/base.py", line 12, in <module>
    import pycld2 as cld2
ModuleNotFoundError: No module named 'pycld2'

If I sudo -H pip install pycld2 now complains about morfessor....

sudohainguyen commented 3 years ago

I just tried polyglot and get this issue... should I create a new one?

pablo /tmp $ sudo -H pip install polyglot
Collecting polyglot
  Downloading polyglot-16.7.4.tar.gz (126 kB)
     |████████████████████████████████| 126 kB 3.8 MB/s 
Building wheels for collected packages: polyglot
  Building wheel for polyglot (setup.py) ... done
  Created wheel for polyglot: filename=polyglot-16.7.4-py2.py3-none-any.whl size=55714 sha256=398c019f025b57869f0a07df908425a9805013213179c6255237f1bdca972eda
  Stored in directory: /root/.cache/pip/wheels/99/d9/0e/2e76da7ea1f5713a3b70f4b4d81a84111030d0bc39fb8905ba
Successfully built polyglot
Installing collected packages: polyglot
Successfully installed polyglot-16.7.4

pablo /tmp $ cat /tmp/atext | polyglot detect
Traceback (most recent call last):
  File "/usr/local/bin/polyglot", line 5, in <module>
    from polyglot.__main__ import main
  File "/usr/local/lib/python3.6/dist-packages/polyglot/__main__.py", line 19, in <module>
    from polyglot.detect import Detector
  File "/usr/local/lib/python3.6/dist-packages/polyglot/detect/__init__.py", line 1, in <module>
    from .base import Detector, Language
  File "/usr/local/lib/python3.6/dist-packages/polyglot/detect/base.py", line 12, in <module>
    import pycld2 as cld2
ModuleNotFoundError: No module named 'pycld2'

If I sudo -H pip install pycld2 now complains about morfessor....

same, did you resolve it yet ?

Moilleadoir commented 3 years ago

Why is this closed? I get the same error and would like to know how you solved it @PoeteMaudit .

pabloab commented 3 years ago

same, did you resolve it yet ?

I recently tried again with pip3 (pip 21.1) and Successfully installed polyglot-16.7.4

Moilleadoir commented 3 years ago

Thanks. Manjaro has pip v. 20.3.1 at the moment, so I’ll wait for a package update I suppose.