Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

pyconfig.h not found from custom python 3.7.2 installation

Offen
#282 4 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
cpp, python
Bereich
build-system

Rechercherichtung

Beginnen Sie damit, den Boost.Python-Build mit der benutzerdefinierten Python 3.7.2-Installation zu reproduzieren, und untersuchen Sie boost/python/detail/wrap_python.hpp, wo pyconfig.h eingebunden wird. Prüfen Sie, wie das Python-Include-Verzeichnis ausgewählt wird, wenn sich die Header unter python3.7m befinden; abgeschlossen ist dies, wenn der Build pyconfig.h findet, ohne einen manuellen Symlink zu erfordern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

When compiling boost against a custom python 3.7.2 installation the following error occurrs:

In file included from ./boost/python/detail/prefix.hpp:13:0,
                 from ./boost/python/list.hpp:8,
                 from libs/python/src/list.cpp:5:
./boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory
 # include <pyconfig.h>

This is due to the fact that the include files are located within a directory called python3.7m in the installation include directory:

$ ls -l /usr/local/Python-3.7.2/include
drwxr-xr-x. 3 ralph users 4096 Jan 10 11:05 python3.7m

Creating a softlink from python3.7m to python3.7 solves the problem.

This problem happened on a Centos7 installation. Python was compiled and installed with pretty much standard compile options:

$ ./configure CFLAGS=-fPIC --prefix=/usr/local/Python-3.7.2 --enable-optimizations
Vorherrschende Sprache
C++
Sterne
537
Forks
223
Ø Merge
11 Std. 22 Min.
Gemergte PRs (30 T.)
2

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus boostorg/python

Alle Issues in boostorg/python

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.