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