I was trying to install python 3.7.4 on a freebsd machine.
At the end of make install
the error popped out.
ModuleNotFoundError: No module named '_ctypes'
Libffi is installed by source and its prefix was set to $HOME/lib/libffi
Attempt 1. I've tried installing cpython, and it installed setuptools successfully at the end of make install
. Then when I was installing numpy by source, The same error appeared.
So I deleted cpython and tried to install the regular one again.
Attempt 2. According to this thread I added the some stuffs while doing ./configure
. The full command was:
./configure --enable-optimizations --prefix=$HOME/programs/python --enable-shared LDFLAGS="-L$HOME/lib" CPPFLAGS="-I $HOME/lib/libffi/lib/libffi-3.2.1/include"
but the same error popped out at the end of make install
Attempt 3. I've tried to force install an anaconda on it, but it didn't work.
Side note 1: yum and did not exist on the machine, and I don't have the root access.
Side note 2: I've deleted every -fprofile-correction
in Makefile
, since the machine doesn't recognize it.
Side note 3: this is found near the end of make
:
Python build finished successfully!
(...)
Failed to build these modules:
_ctypes