Python 3.8 无法编译模块_uuid

Her*_*tah 7 python uuid compilation python-3.x python-3.8

编译最新版本的 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
Run Code Online (Sandbox Code Playgroud)

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

RYe*_*ccd 4

请安装 lzma devel lib 和 uuid devel lib。uuid 已链接到该库。 sudo apt-get install uuid-dev lzma-dev liblzma-dev

没有安装:

_uuid 构建失败

安装后sudo apt-get install uuid-dev lzma-dev liblzma-dev

_uuid _lzma 可以