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
On macOS 10.14.2 simply adding the directory containing icu-config
to the PATH
did the trick for me:
brew install icu4c
export PATH="/usr/local/opt/icu4c/bin:$PATH"
pip install pyicu
In fact, this is suggested by brew info icu4c
:
==> Caveats
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).
If you need to have icu4c first in your PATH run:
echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc
For compilers to find icu4c you may need to set:
export LDFLAGS="-L/usr/local/opt/icu4c/lib"
export CPPFLAGS="-I/usr/local/opt/icu4c/include"
For pkg-config to find icu4c you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"