error: Python.h: No such file or directory

When install dlib python module, i get error

ERROR: Failed building wheel for dlib fatal 
error: Python.h: No such file or directory

This is because missing python3-dev package. To fix, install

apt install python3-dev

If you are using python virtualenv, you will need to recreate the virtualenv after installing dev package.

virtualenv -p /usr/bin/python3 venv
Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *