Error “modulenotfounderror: no module named” in installing flash in Python 3.8_ ctypes’”

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>


I wanted to configure the flash + nginx + uwsgi environment in CentOS. As a result, there are problems in installing the most basic flash package… Here is my environment:

Server: alicloud ECS centos7

Python version: 3.8.0


Problem Description:

When executing the command “ PIP3 install flash ” to install flash, the following error occurs:

from _ctypes import Union, Structure, Array
    ModuleNotFoundError: No module named '_ctypes'

From the error description, it is missing_ Ctypes module. According to the online search results, this error mostly occurs when installing Python 3.7 or above. The solutions are as follows:

Solution to this error when installing Python:

The reason is that the package “libffi devel” is missing. You can use Yum to install it

yum install libffi-devel

— refer to “Begonia is not full”

However, for me, the problem has not been solved. I still report the same error when I execute PIP installation command again after installing libffi devel, but most people can solve it perfectly through the above methods, which can not help but cause my thinking

Thinking:

The difference between me and the above solution is that I didn’t make an error when installing Python 3.8, but after I owned Python 3.8, I made an error when installing flash

Inspired by Bryan, he installed “libffi devel” and then re installed Python to solve the problem

I didn’t make any explicit errors when installing Python 3.8. I guess it might be the optimization of Python 3.8 relative to 3.7, but the problem is still unsolved. Therefore, after installing “libffi devel”, I choose to re install Python 3.8. For the installation process, please refer to here

The problem has finally been solved. Long live the reload

Similar Posts: