Thursday, May 2, 2019

Python 3 -- ModuleNotFoundError: No module named '_ctypes' while Compiling Python 3.7

Problem

While building and installing Python 3.7 from source you get errors similar to below:

ModuleNotFoundError: No module named '_ctypes'
make: *** [install] Error 1

Solution

Install libffi-devel package and rebuild your Python installation. Alternatively you may try make altinstall

# yum install libffi-devel
# ./configure --enable-optimizations
# make altinstall

 
 

No comments: