报错背景:
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