aboSamoor / polyglot

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

IMPOSSIBLE to install on MacOS #248

Open DanilZherebtsov opened 3 years ago

DanilZherebtsov commented 3 years ago

I have tried all the documents, forums and stack overflow articles. polyglot installs without any problems I have tried multiple options of installing pyicu (pip, source, through icu4c). In all cases when I try importing polyglot.text I get the following error:

ImportError: dlopen(/Users/danil/anaconda3/lib/python3.7/site-packages/_icu.cpython-37m-darwin.so, 2): Symbol not found: __ZN6icu_5818AnnualTimeZoneRule8MAX_YEARE

python 3.7.10 macOS 11.6

Could you please advice!

EtienneAb3d commented 3 years ago

Try to create a virtual env using Python 3.6 (rather than 3.7)

TamatiB commented 3 years ago

I am having the same issue. I have a conda env with Python 3.6

ImportError: dlopen(/Users/nb315382/miniconda3/envs/nlpenv/lib/python3.6/site-packages/_icu.cpython-36m-darwin.so, 2): Symbol not found: __ZN6icu_5818AnnualTimeZoneRule8MAX_YEARE

macOs 11.5.2

TamatiB commented 3 years ago

I am having the same issue. I have a conda env with Python 3.6

ImportError: dlopen(/Users/nb315382/miniconda3/envs/nlpenv/lib/python3.6/site-packages/_icu.cpython-36m-darwin.so, 2): Symbol not found: __ZN6icu_5818AnnualTimeZoneRule8MAX_YEARE

macOs 11.5.2

I used this answer and it worked

https://github.com/aboSamoor/polyglot/issues/80#issuecomment-417863726

ehsong commented 2 years ago

I can't install either, used pip3 install polygot but got the message:

----> 1 import utKit
      2 import cl_utils
      3 from printpdf import printpdf
      4 from authenticate import authenticate
      5 from htmlCleaner import htmlCleaner

ModuleNotFoundError: No module named 'utKit'
asifkhan69 commented 2 years ago

@DanilZherebtsov The same problem I have resolved on my mac OS 12.6 Monterey by doing following

  1. brew info icu4c This will give you your machine icu4c information and paths which is required to set before pip install pyicu
  2. set env with - export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c/lib/pkgconfig"
  3. pip install --no-cache-dir pyicu Done. My pyicu successfully installed on my Mac machine.