报错:ModuleNotFoundError: No module named '_ctypes'
报错 39 No module named ModuleNotFoundError
2023-09-11 14:14:33 时间
报错背景:
CentOS 7
Python3.7
安装 setuptools 插件的时候报错。
报错现象:
[root@master setuptools-41.0.1]# python3.7 setup.py build Traceback (most recent call last): File "setup.py", line 11, in <module> import setuptools File "/bigdata/sources/python/setuptools-41.0.1/setuptools/__init__.py", line 20, in <module> from setuptools.dist import Distribution, Feature File "/bigdata/sources/python/setuptools-41.0.1/setuptools/dist.py", line 35, in <module> from setuptools import windows_support File "/bigdata/sources/python/setuptools-41.0.1/setuptools/windows_support.py", line 2, in <module> import ctypes File "/usr/local/python3.7/lib/python3.7/ctypes/__init__.py", line 7, in <module> from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' [root@master setuptools-41.0.1]#
报错原因:
不明
报错解决:
下载 libffi-devel-3.0.13-18.el7.x86_64.rpm 并安装
下载地址:https://centos.pkgs.org/7/centos-x86_64/libffi-devel-3.0.13-18.el7.x86_64.rpm.html
安装libffi-devel: rpm -ivh libffi-devel-3.0.13-18.el7.x86_64.rpm
进入setuptools: cd setuptools-41.0.1/
安装setuptools: python setup.py install
相关文章
- SQL Server导入数据报错"无法在只读列“Id”中插入数据",几百个表怎么批量启用'启用标识插入'选项
- java:Maven构建项目速度太慢的解决办法,以及报错Retrieving archetypes:' has encountered a problem
- 配置log4j2日志报错 Cannot find the declaration of element 'Configuration'
- IDEA报错Target level '1.6' is incompatible with source level '1.7'
- python print 打印的数据包含中文,打印报错UnicodeDecodeError: 'gbk' codec can't decode bytes in position 459-460: illegal multibyte sequence解决办法
- curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.报错
- 源码安装mysql5.6x启动报错:[ERROR] Can't find messagefile '/data/mysqldata/3306/english/errmsg.sys'
- vue - public 引入 <script>报错 Uncaught SyntaxError: Unexpected token '<'
- python通过grpc调用tfserving报错has no attribute 'beta_create_PredictionService_stub'
- mysql报错:Data too long for column ''
- @PathVariable不起作用,报错:Cannot resolve @PathVariable ' '
- sphinx :undefined reference to `libiconv' 报错解决办法
- Linux QtCreator 编译报错:No rule to make target '.../***' needed by '***.o'.stop