I have Python on my Ubuntu system, but gcc can't find Python.h

后端 未结 14 1777
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-27 13:10

I am on a school computer, so I can\'t install anything.

I am trying to create C code which can be run in Python. It seems all the articles I am finding on it requi

14条回答
  •  萌比男神i
    2020-11-27 13:46

    That means you are not install libraries for python dev.

    If you are on Linux OS, you can solve this issue by commands separately below:

    • Ubuntu (Debian) :

      sudo apt-get install python-dev (Py2) or sudo apt-get install python3-dev (Py3)

    • Rehat (CentOS):

      yum install python-devel

提交回复
热议问题