Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Building for Python3.6 - ImportError: undefined symbol: PyClass_Type

オープン
#246 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp, python
領域
backend

調査の方向性

まず、報告された手順を ./bootstrap --with-python-version=3.6./b2 --with-python --debug-configuration で再現し、次に libs/pythion/example/tutorial がどのライブラリを読み込むかを確認します。その結果を、報告された libboost_python-py27.so.1.65.1PyClass_Type のエラーと比較します。完了の条件は、チュートリアルが Python 2 のシンボルエラーなしで Python 3 ビルドを使用することです。

索引モデルが issue の本文から書いたものです。

説明

Hi,

I am trying to build boost for use with Python 3 but I am having some troubles.
I call ./bootstrap --with-python-version=3.6 and then ./b2 --with-python --debug-configuration which correctly shows python 3.6 is being used and the python component is being built.

When running the $BOOST_ROOT/libs/pythion/example/tutorial, I get the following error:
ImportError: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.65.1: undefined symbol: PyClass_Type

This shows the python2.7 shared object is being used and I am aware that the PyClass_Type is a Python 2 type. So somehow the program is still being built with python 2 despite me specifying Python 3.
I have tried several iterations of cleaning and building all, just in case something had not been built properly, but I still get the same issue.

Am I missing something ?

Thanks

主要言語
C++
スター
537
フォーク
223
平均マージ
11時間 22分
マージ済み PR(30日)
2

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

boostorg/python のほかの issue

boostorg/python の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。