首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在continuumio/miniconda3上安装PyICU :4.9.2映像

在continuumio/miniconda3上安装PyICU :4.9.2映像
EN

Stack Overflow用户
提问于 2021-05-05 17:46:38
回答 1查看 128关注 0票数 0

不幸的是,当从https://hub.docker.com/r/continuumio/miniconda3使用Docker base:continuumio/miniconda3:4.9.2并运行:pip install PyICU==2.4.2时,我收到以下错误:

代码语言:javascript
运行
复制
------                                                                                                                      
 > [ 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.

我也尝试过安装这些包,但是没有成功:

代码语言:javascript
运行
复制
RUN apt-get update
RUN apt-get install -y sudo build-essential pkg-config gcc awscli jq vim 

有人知道我遗漏了什么配置/我需要添加什么包吗?

EN

回答 1

Stack Overflow用户

发布于 2021-05-05 20:38:36

PyICU是C++ ICU库的Python包装器。您需要先安装该库:

代码语言:javascript
运行
复制
apt-get install libicu-dev

另请参阅https://gitlab.pyicu.org/main/pyicu#installing-pyicu

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67398894

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档