I have a docker image in which I'm trying to install pyicu
(version 2.3 but other versions fail to install as well). Installation of pyicu works there. I used to build FROM python:3.6
in the Dockerfile but now upgrading to use ubuntu:21.04
and getting the error below. Using Python 3.6 and running apt-get -y update && apt-get install -y --no-install-recommends libicu-dev
in both.
I see that a potential issue could be that the pkg-config
package has been deleted from Ubuntu 21 https://www.ubuntuupdates.org/package/core/impish/main/proposed/pkg-config. Is this the root of the issue and if so how can I resolve it?
Downloading https://docker.artifactory.enigma.com/artifactory/api/pypi/pypi/packages/packages/87/10/fdf5842f42834f6e3141668b607c07bc3c94de39acf582c3d4015e7a7fc5/PyICU-2.3.tar.gz (214 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /root/.pyenv/versions/3.6.10/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-g23e769w/pyicu_fa1d77f63b4346f48975bf7f3d7508cc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-g23e769w/pyicu_fa1d77f63b4346f48975bf7f3d7508cc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-lv3srr2x
cwd: /tmp/pip-install-g23e769w/pyicu_fa1d77f63b4346f48975bf7f3d7508cc/
Complete output (53 lines):
(running 'icu-config --version')
(running 'pkg-config --modversion icu-i18n')
Traceback (most recent call last):
File "/tmp/pip-install-g23e769w/pyicu_fa1d77f63b4346f48975bf7f3d7508cc/setup.py", line 62, in <module>
ICU_VERSION = os.environ['ICU_VERSION']
File "/root/.pyenv/versions/3.6.10/lib/python3.6/os.py", line 669, 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 "/tmp/pip-install-g23e769w/pyicu_fa1d77f63b4346f48975bf7f3d7508cc/setup.py", line 65, in <module>
ICU_VERSION = check_output(('icu-config', '--version')).strip()
File "/tmp/pip-install-g23e769w/pyicu_fa1d77f63b4346f48975bf7f3d7508cc/setup.py", line 18, in check_output
return subprocess_check_output(popenargs)
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 1364, 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 "/tmp/pip-install-g23e769w/pyicu_fa1d77f63b4346f48975bf7f3d7508cc/setup.py", line 68, in <module>
ICU_VERSION = check_output(('pkg-config', '--modversion', 'icu-i18n')).strip()
File "/tmp/pip-install-g23e769w/pyicu_fa1d77f63b4346f48975bf7f3d7508cc/setup.py", line 18, in check_output
return subprocess_check_output(popenargs)
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config': 'pkg-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-g23e769w/pyicu_fa1d77f63b4346f48975bf7f3d7508cc/setup.py", line 73, in <module>
''')
RuntimeError:
Please set the ICU_VERSION environment variable to the version of
ICU you have installed.
----------------------------------------
WARNING: Discarding https://docker.artifactory.enigma.com/artifactory/api/pypi/pypi/packages/packages/87/10/fdf5842f42834f6e3141668b607c07bc3c94de39acf582c3d4015e7a7fc5/PyICU-2.3.tar.gz#sha256=419d389b014ee48f31014920f300c842df0770a283ab1fb4de82a6af334cac4d (from https://docker.artifactory.enigma.com/artifactory/api/pypi/pypi/simple/pyicu/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading PyICU-2.3.tar.gz (214 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /root/.pyenv/versions/3.6.10/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-g23e769w/pyicu_674899e91a7845b198565e0928c250ac/setup.py'"'"'; __file__='"'"'/tmp/pip-install-g23e769w/pyicu_674899e91a7845b198565e0928c250ac/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-rv07hczd
cwd: /tmp/pip-install-g23e769w/pyicu_674899e91a7845b198565e0928c250ac/
Complete output (53 lines):
(running 'icu-config --version')
(running 'pkg-config --modversion icu-i18n')
Traceback (most recent call last):
File "/tmp/pip-install-g23e769w/pyicu_674899e91a7845b198565e0928c250ac/setup.py", line 62, in <module>
ICU_VERSION = os.environ['ICU_VERSION']
File "/root/.pyenv/versions/3.6.10/lib/python3.6/os.py", line 669, 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 "/tmp/pip-install-g23e769w/pyicu_674899e91a7845b198565e0928c250ac/setup.py", line 65, in <module>
ICU_VERSION = check_output(('icu-config', '--version')).strip()
File "/tmp/pip-install-g23e769w/pyicu_674899e91a7845b198565e0928c250ac/setup.py", line 18, in check_output
return subprocess_check_output(popenargs)
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 1364, 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 "/tmp/pip-install-g23e769w/pyicu_674899e91a7845b198565e0928c250ac/setup.py", line 68, in <module>
ICU_VERSION = check_output(('pkg-config', '--modversion', 'icu-i18n')).strip()
File "/tmp/pip-install-g23e769w/pyicu_674899e91a7845b198565e0928c250ac/setup.py", line 18, in check_output
return subprocess_check_output(popenargs)
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/root/.pyenv/versions/3.6.10/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config': 'pkg-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-g23e769w/pyicu_674899e91a7845b198565e0928c250ac/setup.py", line 73, in <module>
''')
RuntimeError:
Please set the ICU_VERSION environment variable to the version of
ICU you have installed.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/87/10/fdf5842f42834f6e3141668b607c07bc3c94de39acf582c3d4015e7a7fc5/PyICU-2.3.tar.gz#sha256=419d389b014ee48f31014920f300c842df0770a283ab1fb4de82a6af334cac4d (from https://pypi.org/simple/pyicu/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pyicu==2.3 (from versions: 0.8, 0.8.1, 0.9, 1.0, 1.0.1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.9.7, 1.9.8, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.1, 2.2, 2.3, 2.3.1, 2.4, 2.4.1, 2.4.2, 2.4.3, 2.5, 2.6, 2.7, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8)
ERROR: No matching distribution found for pyicu==2.3