Cannot compile Python.h – Websockify installation Error

Updated on May 15, 2020

Question: While installing Websockify, I encountered the error: SystemError: Cannot compile Python.h.  Below is the complete error

#python3.6 install
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.

Note: As there was no yum repository that provided Websockify binary for PPC64LE (including the remi repository), I had to compile it from the source.  You can download the Websockify source from this link.

Fix the error Cannot compile Python.h

As you can see, the error message hints at installing the Python development package will solve the issue. Installing the Python development package is simple.

Install the corresponding Python development package (In my case I need python3)

# yum install python3-devel

Do you get No module named Cython. RuntimeError: Running cythonize failed error? Well, check this tutorial for the fix.

Was this article helpful?

Related Articles

Leave a Comment