Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ModuleNotFoundError: No Module Named _Ctypes in Python

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Issue

The error message “ModuleNotFoundError: No Module Named _Ctypes” is thrown when using Python.

Cause

A crucial built-in module, _ctypes, is either missing from your Python installation or cannot be located.

For more discussions, please refer to Chat with Gemini - Resolving _ctypes Module Not Found .

Solution

  1. Remove Python.

  2. Install libffi-dev

     :::bash
     sudo apt-get update
     sudo apt-get install libffi-dev
  3. Reinstall Python.

References