为了账号安全,请及时绑定邮箱和手机立即绑定

安装 PyICU 的 Python 分段错误

安装 PyICU 的 Python 分段错误

婷婷同学_ 2021-11-02 19:06:31
我一直在尝试安装一个名为 Polyglot 的 Python 库,而这又需要 PyICU,这是我的问题之源。在对错误的疯狂追逐之后,我能够在我的 EC2 实例上安装 PyICU。但是,在运行 Polyglot 和 PyICU 时,我收到以下错误:Traceback (most recent call last):  File "/mnt/data/anaconda3/bin/polyglot", line 11, in <module>    load_entry_point('polyglot==16.7.4', 'console_scripts', 'polyglot')()  File "/mnt/data/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point    return get_distribution(dist).load_entry_point(group, name)  File "/mnt/data/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point    return ep.load()  File "/mnt/data/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load    return self.resolve()  File "/mnt/data/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve    module = __import__(self.module_name, fromlist=['__name__'], level=0)  File "/mnt/data/anaconda3/lib/python3.6/site-packages/polyglot/__main__.py", line 16, in <module>    from icu import Locale  File "/mnt/data/anaconda3/lib/python3.6/site-packages/icu/__init__.py", line 37, in <module>    from _icu import *ImportError: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /home/linuxbrew/.linuxbrew/lib/libstdc++.so.6)为了解决上述问题,我执行了以下步骤:mkdir ~/glibc_install; cd ~/glibc_install wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gztar zxvf glibc-2.18.tar.gzcd glibc-2.18mkdir buildcd build../configure --prefix=/opt/glibc-2.18make -j4make installexport LD_LIBRARY_PATH=/opt/glibc-2.18/lib但是当我简单地运行 Python 时,我立即遇到了分段错误。请注意,我在 AWS EC2 上使用 Red Hat 7.1.2-2。任何帮助都将不胜感激!
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 286 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信