I am trying to compile c from python.
There shows the following errors after I executing the following commands:
-Wall -I/usr/include/python3.5/config-3.5m-x86_64-linux-gnu/libpython3.5m.a -lpython35 -o prime_numbers_2 prime_numbers_2.c
prime_numbers_2.c:11:20: fatal error: Python.h: No Such File or
directory compilation terminated.I also search in the directory /usr/lib with the following command:
find . -name Python.hbut there is no Python.h in that directory.
How can I fix these problems? Should I reinstall Python3.5.2?
2 Answers
You should install the development package of Python which contains header files and the library of Python.
sudo apt-get install python3-devSources:
4For those people who came here and are using pypy, make sure to do:
sudo apt-get install pypy3-dev