Unable to install pyicu with pip in python3
Created by: elcolie
OS: OSX 10.14.2
Python Version 3.7.3
$ pip install PyICU
Collecting PyICU
Using cached https://files.pythonhosted.org/packages/87/10/fdf5842f42834f6e3141668b607c07bc3c94de39acf582c3d4015e7a7fc5/PyICU-2.3.tar.gz
Complete output from command python setup.py egg_info:
Package icu-i18n was not found in the pkg-config search path.
Perhaps you should add the directory containing `icu-i18n.pc'
to the PKG_CONFIG_PATH environment variable
No package 'icu-i18n' found
(running 'icu-config --version')
(running 'pkg-config --modversion icu-i18n')
Traceback (most recent call last):
File "/private/var/folders/h5/lj3c5_050j3_yjd77zqxcn7r0000gp/T/pip-install-tmtes8h2/PyICU/setup.py", line 62, in <module>
ICU_VERSION = os.environ['ICU_VERSION']
File "/Users/sarit/.pyenv/versions/3.7.3/lib/python3.7/os.py", line 678, in __getitem__
raise KeyError(key) from None
KeyError: 'ICU_VERSION'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/var/folders/h5/lj3c5_050j3_yjd77zqxcn7r0000gp/T/pip-install-tmtes8h2/PyICU/setup.py", line 65, in <module>
ICU_VERSION = check_output(('icu-config', '--version')).strip()
File "/private/var/folders/h5/lj3c5_050j3_yjd77zqxcn7r0000gp/T/pip-install-tmtes8h2/PyICU/setup.py", line 18, in check_output
return subprocess_check_output(popenargs)
File "/Users/sarit/.pyenv/versions/3.7.3/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/Users/sarit/.pyenv/versions/3.7.3/lib/python3.7/subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "/Users/sarit/.pyenv/versions/3.7.3/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/Users/sarit/.pyenv/versions/3.7.3/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'icu-config': 'icu-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/var/folders/h5/lj3c5_050j3_yjd77zqxcn7r0000gp/T/pip-install-tmtes8h2/PyICU/setup.py", line 68, in <module>
ICU_VERSION = check_output(('pkg-config', '--modversion', 'icu-i18n')).strip()
File "/private/var/folders/h5/lj3c5_050j3_yjd77zqxcn7r0000gp/T/pip-install-tmtes8h2/PyICU/setup.py", line 18, in check_output
return subprocess_check_output(popenargs)
File "/Users/sarit/.pyenv/versions/3.7.3/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/Users/sarit/.pyenv/versions/3.7.3/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '('pkg-config', '--modversion', 'icu-i18n')' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/h5/lj3c5_050j3_yjd77zqxcn7r0000gp/T/pip-install-tmtes8h2/PyICU/setup.py", line 73, in <module>
''')
RuntimeError:
Please set the ICU_VERSION environment variable to the version of
ICU you have installed.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/h5/lj3c5_050j3_yjd77zqxcn7r0000gp/T/pip-install-tmtes8h2/PyICU/