gpt4 book ai didi

python - 在 python 3.x 中安装 Pyicu

转载 作者:太空狗 更新时间:2023-10-29 18:29:23 26 4
gpt4 key购买 nike

我的系统是 Windows 10 x64

现在我想安装pyicu但是遇到这样的问题

Collecting pyicu

使用缓存的 PyICU-1.9.7.ta​​r.gz 命令 python setup.py egg_info 的完整输出: 追溯(最近一次通话): 文件“C:\Users\ANHVU\AppData\Local\Temp\pip-build-v5fb9ri4\pyicu\setup.py”,第 12 行,在 ICU_VERSION = os.environ['ICU_VERSION'] getitem 中的文件“C:\Users\ANHVU\AppData\Local\Programs\Python\Python35\lib\os.py”,第 725 行 从 None 引发 KeyError(key) KeyError: 'ICU_VERSION'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\ANHVU\AppData\Local\Temp\pip-build-v5fb9ri4\pyicu\setup.py", line 26, in <module>
ICU_VERSION = check_output(('icu-config', '--version')).strip()
File "C:\Users\ANHVU\AppData\Local\Programs\Python\Python35\lib\subprocess.py", line 316, in check_output
**kwargs).stdout
File "C:\Users\ANHVU\AppData\Local\Programs\Python\Python35\lib\subprocess.py", line 383, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\ANHVU\AppData\Local\Programs\Python\Python35\lib\subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "C:\Users\ANHVU\AppData\Local\Programs\Python\Python35\lib\subprocess.py", line 955, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

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

我该如何解决这个问题?请帮助我。

最佳答案

您可以从Unofficial Windows Binaries for Python Extension Packages 下载相应的whl 文件。

例如,您的 64 位 Windows 和 Python3.7 版本的最新版本(截至 2019 年 1 月 13 日)是 PyICU‑2.2‑cp37‑cp37m‑win_amd64.whl

然后以管理员身份打开Windows Powershell控制台,cd到你放置whl文件的目录,执行以下命令:

python -m pip install .\PyICU‑2.2‑cp37‑cp37m‑win_amd64.whl

或者(如果您已经安装了以前的 PyICU 版本)

python -m pip install -U .\PyICU‑2.2‑cp37‑cp37m‑win_amd64.whl

关于python - 在 python 3.x 中安装 Pyicu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46871401/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com