Pip 在ContinuMio/miniconda3:4.9.2图像上安装PyICU

Pip 在ContinuMio/miniconda3:4.9.2图像上安装PyICU,pip,miniconda,pyicu,Pip,Miniconda,Pyicu,不幸的是,在使用Docker base时:continuMio/miniconda3:4.9.2from 和运行: pip install PyICU==2.4.2I收到以下错误: ------ > [ 5/10] RUN pip install PyIC

不幸的是,在使用Docker base时:
continuMio/miniconda3:4.9.2
from 和运行:
pip install PyICU==2.4.2
I收到以下错误:

------                                                                                                                      
 > [ 5/10] RUN pip install PyICU==2.4.2:                                                                                    
#9 0.864 Collecting PyICU==2.4.2                                                                                            
#9 2.275   Downloading PyICU-2.4.2.tar.gz (219 kB)                                                                          
#9 3.115     ERROR: Command errored out with exit status 1:                                                                 
#9 3.115      command: /opt/conda/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k004hem9/pyicu/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k004hem9/pyicu/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-bze17p9f
#9 3.115          cwd: /tmp/pip-install-k004hem9/pyicu/
#9 3.115     Complete output (53 lines):
#9 3.115     Package icu-i18n was not found in the pkg-config search path.
#9 3.115     Perhaps you should add the directory containing `icu-i18n.pc'
#9 3.115     to the PKG_CONFIG_PATH environment variable
#9 3.115     No package 'icu-i18n' found
#9 3.115     Traceback (most recent call last):
#9 3.115       File "/tmp/pip-install-k004hem9/pyicu/setup.py", line 62, in <module>
#9 3.115         ICU_VERSION = os.environ['ICU_VERSION']
#9 3.115       File "/opt/conda/lib/python3.8/os.py", line 675, in __getitem__
#9 3.115         raise KeyError(key) from None
#9 3.115     KeyError: 'ICU_VERSION'
#9 3.115     
#9 3.115     During handling of the above exception, another exception occurred:
#9 3.115     
#9 3.115     Traceback (most recent call last):
#9 3.115       File "/tmp/pip-install-k004hem9/pyicu/setup.py", line 65, in <module>
#9 3.115         ICU_VERSION = check_output(('icu-config', '--version')).strip()
#9 3.115       File "/tmp/pip-install-k004hem9/pyicu/setup.py", line 18, in check_output
#9 3.115         return subprocess_check_output(popenargs)
#9 3.115       File "/opt/conda/lib/python3.8/subprocess.py", line 411, in check_output
#9 3.115         return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
#9 3.115       File "/opt/conda/lib/python3.8/subprocess.py", line 489, in run
#9 3.115         with Popen(*popenargs, **kwargs) as process:
#9 3.115       File "/opt/conda/lib/python3.8/subprocess.py", line 854, in __init__
#9 3.115         self._execute_child(args, executable, preexec_fn, close_fds,
#9 3.115       File "/opt/conda/lib/python3.8/subprocess.py", line 1702, in _execute_child
#9 3.115         raise child_exception_type(errno_num, err_msg, err_filename)
#9 3.115     FileNotFoundError: [Errno 2] No such file or directory: 'icu-config'
#9 3.115     
#9 3.115     During handling of the above exception, another exception occurred:
#9 3.115     
#9 3.115     Traceback (most recent call last):
#9 3.115       File "/tmp/pip-install-k004hem9/pyicu/setup.py", line 68, in <module>
#9 3.115         ICU_VERSION = check_output(('pkg-config', '--modversion', 'icu-i18n')).strip()
#9 3.115       File "/tmp/pip-install-k004hem9/pyicu/setup.py", line 18, in check_output
#9 3.115         return subprocess_check_output(popenargs)
#9 3.115       File "/opt/conda/lib/python3.8/subprocess.py", line 411, in check_output
#9 3.115         return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
#9 3.115       File "/opt/conda/lib/python3.8/subprocess.py", line 512, in run
#9 3.115         raise CalledProcessError(retcode, process.args,
#9 3.115     subprocess.CalledProcessError: Command '('pkg-config', '--modversion', 'icu-i18n')' returned non-zero exit status 1.
#9 3.115     
#9 3.115     During handling of the above exception, another exception occurred:
#9 3.115     
#9 3.115     Traceback (most recent call last):
#9 3.115       File "<string>", line 1, in <module>
#9 3.115       File "/tmp/pip-install-k004hem9/pyicu/setup.py", line 70, in <module>
#9 3.115         raise RuntimeError('''
#9 3.115     RuntimeError:
#9 3.115     Please install pkg-config on your system or set the ICU_VERSION environment
#9 3.115     variable to the version of ICU you have installed.
#9 3.115     
#9 3.115     (running 'icu-config --version')
#9 3.115     (running 'pkg-config --modversion icu-i18n')
#9 3.115     ----------------------------------------
#9 3.115 ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

有没有人知道我丢失了什么配置?需要添加什么包?

< PyCuu是一个围绕C++ ICU库的Python包装器。您需要首先安装所述库:

apt-get install libicu-dev
另见

apt-get install libicu-dev