- Debian
sudo apt-get install python3-icu - Ubuntu:
sudo apt install pyicu - openSUSE:
sudo zypper install python3-PyICU - Fedora:
sudo dnf install python3-pyicu - Other distros:
- Install ICU
- Run
sudo pip3 install PyICUorpip3 install PyICU --user
- Run
pkg install libicu - Run
pip install PyICU
brew install pkg-config icu4c
export PATH="$(brew --prefix)/opt/icu4c/bin:$(brew --prefix)/opt/icu4c/sbin:$PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/icu4c/lib/pkgconfig"
# ensure system clang is used for proper libstdc++
# https://github.com/ovalhub/pyicu/issues/5#issuecomment-291631507
unset CC CXX
python3 -m pip install PyICU-
Download latest file that matches your system:
cp313for Python 3.13,cp312for Python 3.12, etc.win_amd64for Windows 64-bit,win32for Windows 32-bit.
For example:
pyicu-2.16-cp313-cp313-win_amd64.whlfor 64-bit with Python 3.13
-
Open Start -> type Command -> right-click on Command Prompt -> Run as administrator
-
Type
pip installthen drag-and-drop downloaded file into Command Prompt and press Enter.