I have been trying to install musicbrainz server on my mac and there is a step where I have to install pip pyicu. I keep getting this error:
Collecting pyicu
I was trying to install in RHEL and I installed from the tar.gz file. Below are the commands:
/usr/local/bin/pip3 install -U setuptools
/usr/local/bin/pip3 install -U wheel
wget http://download.icu-project.org/files/icu4c/50.1.2/icu4c-50_1_2-src.tgz
tar -zxvf icu4c-50_1_2-src.tgz
cd icu
cd source
sudo ./configure --prefix=/usr
sudo make
sudo make install
icu-config --version
/usr/local/bin/pip3 install PyICU==2.0.6
I was facing this issue on my mac when trying to install polyglot (pyicu is needed for polyglot). The following resolved this for me.
# Install icu
brew install icu4c
# check newest version
ls /usr/local/Cellar/icu4c/
# Edit pyicu installer to work
git clone https://github.com/ovalhub/pyicu.git
# edit setup.py not to query for the version, i.e. change
# ICU_VERSION = subprocess.check_output(('icu-config', '--version')).strip()
# to whatever your version is, e.g.
# ICU_VERSION = '57.1'
# Install pyicu
env LDFLAGS=-L/usr/local/opt/icu4c/lib CPPFLAGS=-I/usr/local/opt/icu4c/include DYLD_LIBRARY_PATH=-L/usr/local/opt/icu4c/lib python setup.py build
env LDFLAGS=-L/usr/local/opt/icu4c/lib CPPFLAGS=-I/usr/local/opt/icu4c/include DYLD_LIBRARY_PATH=-L/usr/local/opt/icu4c/lib sudo python setup.py install
# Change DYLD_LIBRARY_PATH (not sure if req'd)
DYLD_LIBRARY_PATH=/usr/local/Cellar/icu4c/{version, e.g. 57.1}/:$DYLD_LIBRARY_PATH
echo $DYLD_LIBRARY_PATH
# Icu works now from python, and you can proceed with polyglot
$ python
>>> import icu
$ pip install polyglot
$ python
>>> import polyglot