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

后端 未结 14 1794
爱一瞬间的悲伤
爱一瞬间的悲伤 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条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-27 13:45

    None of the answers worked for me. If you are running on Ubuntu, you can try:

    With python3:

    sudo apt-get install python3 python-dev python3-dev \
         build-essential libssl-dev libffi-dev \
         libxml2-dev libxslt1-dev zlib1g-dev \
         python-pip
    

    With Python 2:

    sudo apt-get install python-dev  \
         build-essential libssl-dev libffi-dev \
         libxml2-dev libxslt1-dev zlib1g-dev \
         python-pip
    

提交回复
热议问题