Wednesday, April 24, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 8959  / 2 Years ago, sat, september 10, 2022, 2:12:49

I just switched to Linux (Ubuntu 20.04) from Windows. After installing python-dev I notice that Python.h is still not included, which breaks my integrated Python-C++ build (I'm using pybind11). I also tried to install every other variant of python-dev I saw mentioned online (python3-dev, python-devel, etc.) but to no avail.


Interestingly, installing python3-dev on Ubuntu 18.04 includes this file and everything works.


Might this be a bug in the 20.04 version?


More From » python

 Answers
1

You can try the following:


sudo updatedb
locate Python.h

Output:


/usr/include/python2.7/Python.h
/usr/include/python3.5m/Python.h

Then set


export CPATH=/usr/include/python3.5m:$CPATH
export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH

[#2960] Sunday, September 11, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oraoming

Total Points: 354
Total Questions: 105
Total Answers: 124

Location: Iraq
Member since Sat, Apr 3, 2021
3 Years ago
oraoming questions
Fri, Aug 20, 21, 10:08, 3 Years ago
Mon, May 24, 21, 21:56, 3 Years ago
Mon, Dec 12, 22, 23:21, 1 Year ago
Mon, Sep 12, 22, 11:38, 2 Years ago
Mon, May 30, 22, 01:38, 2 Years ago
;