'Module Not Found Error: No module named '_ctypes'

I try to launch a python file but it returns me the error:

File "/usr/local/lib/python3.10/ctypes/init.py", line 8, in from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes'

The only solution I found on the web is to:

sudo dnf install libffi-dev

I tried but it doesn't work either, although it seems to work for everyone. If anyone has a lead...



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source