1

我有一个正在尝试安装的 docker 映像pyicu(2.3 版,但其他版本也无法安装)。pyicu 的安装工作在那里。我曾经FROM python:3.6在 Dockerfile 中构建,但现在升级以使用ubuntu:21.04并收到以下错误。使用 Python 3.6 并apt-get -y update && apt-get install -y --no-install-recommends libicu-dev在两者中运行。

我看到一个潜在的问题可能是该pkg-config软件包已从 Ubuntu 21 https://www.ubuntuupdates.org/package/core/impish/main/proposed/pkg-config中删除。这是问题的根源吗?如果是,我该如何解决?

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
4

0 回答 0