安裝polyglot出錯
錯誤
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-w4Rmuu/PyICU/setup.py", line 53, in <module>
''')
RuntimeError:
Please set the ICU_VERSION environment variable to the version of
ICU you have installed.
解決
在Mac上
brew install icu4c
brew link icu4c
在centos上
yum install -y libicu-devel
若用docker打包centos上還可能提示下面錯誤
Rpmdb checksum is invalid: dCDPT(pkg checksums): libicu.x86_64 0:50.1.2-15.el7 - u
解決方式為:
RUN rpm --rebuilddb \
&& yum install -y libicu-devel
參考
- https://stackoverflow.com/questions/40940188/error-installing-pip-pyicu
- https://www.jianshu.com/p/00ad841eca38