【问题标题】:after upgrade homebrew ocrmypdf Fatal Python error: config_get_locale_encoding: failed to get the locale encoding: nl_langinfo升级自制软件 ocrmypdf 致命 Python 错误:config_get_locale_encoding: failed to get the locale encoding: nl_langinfo
【发布时间】:2020-11-03 23:08:37
【问题描述】:

自从我升级了自制软件(在 macOS Catalina 15.5 上),ocrmypdf 发出了一个奇怪的错误。

我发布了ocrmypdf

% ocrmypdf                                             
Fatal Python error: config_get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed
Python runtime state: preinitialized

致命的 Python 错误:config_get_locale_encoding: failed to get the locale encoding: nl_langinfo

什么是 nl_langinfo ?

我设置了这些环境变量:

LANG=en_us
LC_COLLATE=en_us
LC_ALL=en_US
LC_CTYPE=UTF-8

但是设置这些变量并没有帮助。 Settinog export PYTHONHOME=/Users/klaas/homebrew/lib/python3.7 也无济于事。 有人知道这个问题吗?

【问题讨论】:

    标签: python homebrew locale


    【解决方案1】:

    终于找到了。

    看完https://bugs.python.org/issue34544

    我取消设置 LC_ALL(这是 en-US)和 Python3.8(和 ocrmypdf)工作!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-09-28
      • 2021-12-14
      • 2020-06-18
      • 2021-12-10
      • 2015-01-18
      • 2014-04-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多