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:
- [Solved] Centos6: Python 2.6 upgrade to 3.7, error handling [no module named ‘_ctypes’]
- Linux Error: _mysql.c:32:20: fatal error: Python.h: No such file or directory [Solved]
- unable to execute ‘gcc’: No such file or directory
- Make Command ERROR: “make:*** No targets specified and no makefile found.Stop.” [Three Method to Solve]
- Installing ncurses devel in Ubuntu 10.10
- Can’t find PHP headers in /usr/include/php The php-devel package is required for use of this command.
- Python Installation WARNING: pip is configured with locations that require TLS/SSL, however the ssl module…
- No module named _tkinter, please install the python-tk package solution summary
- How to Solve Python flash_mysqldb Install error
- Centos7 vmware Install Error: C header files matching your running kernel were not found.