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.

Advertisement

virtualenv -p /usr/bin/python3 venv
Add a comment

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement