【问题标题】:Error installing PyICU in python 3.6.2 recently installed package在 python 3.6.2 最近安装的包中安装 PyICU 时出错
【发布时间】:2017-08-05 22:38:16
【问题描述】:

所以,刚刚安装了最新的 3.6.2 python 版本并更新了 pip 和 setuptools,所以我开始安装 PyICU,但没有安装错误,在 Internet 中导航我没有发现相同的错误,我在 1.9 中发现了一些类似的错误.5 但看起来不一样。有人知道吗?:

python -m pip install PyICU

Collecting PyICU
  Using cached PyICU-1.9.7.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "MPATH\Temp\pip-build-b_ftb5gu\PyICU\setup.py", line 12, in <module>
        ICU_VERSION = os.environ['ICU_VERSION']
      File " MPATH \Programs\Python\Python36-32\lib\os.py", line 669, in __getitem__
        raise KeyError(key) from None
    KeyError: 'ICU_VERSION'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "C MPATH \Temp\pip-build-b_ftb5gu\PyICU\setup.py", line 26, in <module>
        ICU_VERSION = check_output(('icu-config', '--version')).strip()
      File " MPATH \Programs\Python\Python36-32\lib\subprocess.py", line 336, in check_output
        **kwargs).stdout
      File " MPATH \Programs\Python\Python36-32\lib\subprocess.py", line 403, in run
        with Popen(*popenargs, **kwargs) as process:
      File " MPATH \Programs\Python\Python36-32\lib\subprocess.py", line 707, in __init__
        restore_signals, start_new_session)
      File " MPATH \Programs\Python\Python36-32\lib\subprocess.py", line 992, in _execute_child
        startupinfo)
    FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File " MPATH \Temp\pip-build-b_ftb5gu\PyICU\setup.py", line 33, in <module>
        ''')
    RuntimeError:
    Please set the ICU_VERSION environment variable to the version of
    ICU you have installed.


    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in MPATH \Temp\pip-build-b_ftb5gu\PyICU\

【问题讨论】:

  • 您是否尝试过按照错误消息告诉您的操作?
  • @AnthonySottile 嗯...我首先不明白那个消息。它看起来不是自己安装所有依赖项,我需要安装 ICU,对吗?
  • @TrebiaProject。我认为Python 3.6. 存在某些兼容性问题,请尝试使用3.52.7
  • 好的,我正在向pyICU开发团队报告
  • export ICU_VERSION=1.7这样的东西呢

标签: python pyicu


【解决方案1】:

如果在 Linux 上发生错误,应该安装ibicu-dev(在 Debian 上):

sudo apt-get install libicu-dev

来源:https://github.com/ovalhub/pyicu/issues/94

【讨论】:

    【解决方案2】:

    我在新的 Ubuntu 安装中遇到了这个问题,并且能够通过安装 pkg-config 来修复它,以便安装可以找出安装了哪个 icu 版本:

    sudo apt install pkg-config
    

    【讨论】:

      猜你喜欢
      • 2017-04-17
      • 2019-07-02
      • 2018-04-02
      • 2016-06-05
      • 2018-08-17
      • 2023-02-26
      • 2013-08-01
      • 2015-11-05
      • 1970-01-01
      相关资源
      最近更新 更多