Python 3.8无法编译模块_uuid

编译最新版本的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

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

xiaonv5835335 回答:Python 3.8无法编译模块_uuid

请安装lzma devel lib和uuid devel lib。 uuid已链接到此lib。 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

本文链接:https://www.f2er.com/3160463.html

大家都在问