Addressed "Python .h: No such file or directory" when installing uWSGI with Python 3.8

On Ubuntu, when I try to install uWSGI on a virtual environment using Poetry, I get the following error:

poetry install

Here is the cause of the error message.

fatal error: Python.h: No such file or directory
compilation terminated.

There is also an article "Notes on installing uWSGI when using Python3 and venv", here with sudo apt-get install python3-dev I wrote that it would be solved, but in fact I got this error even though I had already installed python3-dev.

Upon further investigation, "fatal error: Python.h: No such file or directory The solution was listed in. Apparently it was necessary to install python3.x-dev with the specified version. I solved it with this command.

sudo apt-get install python3.8-dev

At first, I thought it was an error in Poetry itself, and it took me a while to identify the cause. I hope it helps people who are addicted to similar problems.

Recommended Posts

Addressed "Python .h: No such file or directory" when installing uWSGI with Python 3.8
What to do when [Errno 2] No such file or directory appears in Python
NO MORE “cd: foo: No such file or directory”
No such file or directory:'chromedriver': Resolve'chromedriver'
pip install --upgrade pip will result in No such file or directory
-bash: ./ {file name} .sh: /usr/bin/bash: bad interpreter: No such file or directory
When I try to run the pip command after updating pip, I get "No such file or directory"
Import Error: libffi.so.6: cannot open shared object file: No such file or directory
Cannot import cv2 (libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)
[Note] How to deal with unicode error and No such file or directory (output table to excel file with pandas)
Error when installing a module with Python pip
When bus = smbus.SMBus (1) gets IOError: [Errno 2] No such file or directory when trying to start the GrovePi starter kit
What to do if ENOENT: no such file or directory appears during npm install
Precautions when installing a hierarchical include directory with waf
Directory structure when writing tests with Python 3 standard unittest
[Python] File / directory operations
Non-blocking with Python + uWSGI
WebSocket with Python + uWSGI
Note installing modules such as pytorch and opencv with pip in Blender python (2.82a or later)
Draw netCDF file with python
Error when playing with python
Create a directory with python
Get home directory with python
Download csv file with python
Error and solution when installing python3 with homebrew on mac (catalina 10.15)
How to deal with errors when installing Python and pip with choco
After installing Anaconda3, I get the error "zsh: no such file or directory:/opt/anaconda3/bin/conda" in the command line preferences.