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

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!