classification
Title: ModuleNotFoundError: No module named '_ctypes' when install Python 3.7 on Linux
Type: Stage:
Components: Installation Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder: make install fails: no module _ctypes
View: 31652
Assigned To: Nosy List: martin.panter, semkin
Priority: normal Keywords:

Created on 2018-07-03 19:10 by semkin, last changed 2018-07-08 03:40 by martin.panter.

Messages (2)
msg320998 - (view) Author: Semyon Levin (semkin) Date: 2018-07-03 19:10
make install failed with
  File "/tmp/tmp2gwe2ma_/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/utils/glibc.py", line 3, in <module>
  File "/common/dev/slevin/tools/Python-3.7.0/Lib/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
make: *** [install] Error 1

I used PKG_CONFIG_PATH in config and LIBFFI_INCLUDEDIR was created correctly in Makefile. 

How to configure location for libffi.a ?
msg321252 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2018-07-08 03:40
Ctypes is meant to be (at least it used to be) an optional module. If you don’t actually care about building ctypes, this might be the same as Issue 31652. Using “configure --without-ensurepip” was suggested as a workaround.

If you do want ctypes to be built, I would look for compiler and linker messages relating to the “_ctypes” module (before the install step).
History
Date User Action Args
2018-07-08 03:40:15martin.pantersetsuperseder: make install fails: no module _ctypes

messages: + msg321252
nosy: + martin.panter
2018-07-03 19:11:23semkinsetcomponents: + Installation
versions: + Python 3.7
2018-07-03 19:10:48semkincreate