Fix: fatal error: No such file or directory compilation terminated

fatal error: No such file or directory compilation terminated.

To fix the above error when trying to build a shared library using C extension (in gcc) you have to make sure that you have installed the Python dev libraries.

Run the below commands in the terminal .

sudo apt-get install python-dev
sudo apt-get install python3-dev
Fix- fatal error- No such file or directory compilation terminated

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!