gpt4 book ai didi

Python 3.8 无法编译模块 _uuid

转载 作者:行者123 更新时间:2023-12-03 14:48:22 25 4
gpt4 key购买 nike

编译最新版本的 Python 3.8,UUID 模块失败并出现以下错误:

/home/centos/Python-3.8.0/Modules/_uuidmodule.c: In function ‘py_uuid_generate_time_safe’:
/home/centos/Python-3.8.0/Modules/_uuidmodule.c:19:5: error: unknown type name ‘uuid_t’
uuid_t uuid;
^
/home/centos/Python-3.8.0/Modules/_uuidmodule.c:36:5: error: implicit declaration of function ‘uuid_generate_time’ [-Werror=implicit-function-declaration]
uuid_generate_time(uuid);
^
/home/centos/Python-3.8.0/Modules/_uuidmodule.c:37:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return Py_BuildValue("y#O", (const char *) uuid, sizeof(uuid), Py_None);
^
cc1: some warnings being treated as errors

我安装了所有相关的软件包,没有任何问题。

最佳答案

请安装 lzma 开发库和 uuid 开发库。 uuid 已链接到此库。sudo apt-get install uuid-dev lzma-dev liblzma-dev没有安装:
_uuid build failed
sudo apt-get install uuid-dev lzma-dev liblzma-dev 之后安装:
_uuid _lzma is ok

关于Python 3.8 无法编译模块 _uuid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58709283/

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