问题标签 [pyicu]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
195 浏览

python - Segmentation fault with Python with install of PyICU

I have been trying to install a Python library called Polyglot, which in turn requires PyICU, the source of my woes. After a wild goose chase of errors, I was able to install PyICU on my EC2 instance. However, when running Polyglot, and in turn PyICU, I get the following error:

To resolve the above issue, I performed the following steps:

But then when I simply ran Python, I got an immediate segmentation fault.

Note that I am using Red Hat 7.1.2-2 on an AWS EC2.

Any help at all would be most appreciated!

0 投票
1 回答
218 浏览

python-2.7 - 使用 python2 在 macOS 上安装 pyicu 64

我首先icu4c从 Homebrew 公式安装:

然后相应地设置标志:

然后从以下位置安装 PyIcu pip

但是在导入时:python -c "import icu"我收到错误

0 投票
1 回答
73 浏览

python - cmp_to_key 在 python3 中不适用于 .csv 文件

我正在处理.csv文件,所以我需要按特定列排序这个答案不起作用:

使用两个 key= 参数进行排序

因此使用来自的想法

如何在 Python 中按字母顺序对 unicode 字符串进行排序?

我们有

python2

结果正确:

但在python3

结果错误:

0 投票
1 回答
4057 浏览

polyglot - Polyglot ImportError:无法从“icu”导入名称“Locale”

我试图为我的情感分析运行多语言。经过一番挣扎,我成功安装了Polyglot和pyicu。但是当我运行我的程序时,它给了我这个错误,我不知道如何修复它

0 投票
1 回答
189 浏览

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

不幸的是,当使用 Docker 基础时:continuumio/miniconda3:4.9.2来自https://hub.docker.com/r/continuumio/miniconda3 并运行: pip install PyICU==2.4.2我收到此错误:

我也尝试安装这些软件包,但是没有运气:

有谁知道我缺少什么配置/我需要添加哪些包?

0 投票
2 回答
512 浏览

python - 如何在 Heroku 上正确安装 PyICU?

我正在尝试在 Heroku 上部署我的 Python 应用程序,但没有成功。包裹似乎出现了问题PyICU,我不确定如何纠正。我已经确认这是我部署的唯一问题;当我PyICU从需求文件中删除时,一切正常。但当然,没有它我的网站就无法工作。

谁能指导我如何在 Heroku 上正确安装这个包?我尝试了各种方法,包括下载 .whl 文件,然后将其添加到我的需求文件中,但随后出现另一个错误:

ERROR: PyICU-2.7.3-cp38-cp38m-win_amd64.whl is not a supported wheel on this platform.我不明白为什么——它是正确的 Python 和操作系统版本。

以下是构建日志的相关摘录:

我有一个requirements.txt指定所有依赖项的文件:

我的Procfile样子如下:

web: gunicorn mysite.wsgi

runtime.txt我有:

python-3.8.10

如果有人能推荐一个修复方法,我将非常感激,谢谢。我知道 PyICU 即使在本地也不是最容易安装的,但是我该如何告诉 Heroku 怎么做呢?

编辑:我尝试为 ICU 添加自定义构建包:https ://github.com/generalassembly/heroku-icu-buildpack

它似乎运行起来有点不同,但仍然会出现关于语言环境的错误以及以下错误:

0 投票
2 回答
227 浏览

python - pip无法安装pyicu

我正在运行运行 Ubuntu 20.04 的 AWS。我正在尝试安装软件包pyicu,但我遇到了问题。我尝试运行sudo apt install libicu-dev,但仍然无法安装 pyicu。我无法在 aws 服务器上安装 brew。还有其他建议吗?这是错误消息:

0 投票
0 回答
146 浏览

python - 安装pyicu==2.8时出错

我已经用 python 的 Flask 包构建了一个 API 服务器。我正在尝试使用终端在 Heroku 上部署服务器,但似乎不起作用。我已经尝试使用Heroku Build Pack 安装包含内容中列出的软件包Aptfile

我还在 Heroku Web Dashboard 中添加了Python 构建包。在安装Apt Packages这里是我得到的输出Heroku Build Pack

然后在Heroku build pack完成后,它会移动到生成Heroku/python包,这会产生以下错误:

也许我可能错过了一件简单的事情。我将不胜感激任何帮助。

谢谢你。