Cannot import Boost.Python from Python 3.11
- 主要語言
- C++
- 星號
- 537
- 分支
- 223
- 平均合併
- 11 小時 22 分鐘
- 30 天內合併 PR
- 2
描述
Hi all,
I'm trying to `import Boost.Python` from Python 3.11 and I'm getting a `ModuleNotFoundError`:
I'm using Boost 1.82.0 on Ubuntu x86_64.
```
>>> import Boost.Python
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'Boost'
```
I've built Boost.Python using the following bootstrap/`b2` commands:
```
$ ./bootstrap.sh --with-python-version=3.11 --with-libraries=python
$ ./b2 -j$(nproc) --with-python install
```
I have also tried `--with-python=/usr/bin/python3.11` on bootstrap but that also doesn't seem to work.
I have tried setting `LD_LIBRARY_PATH` to `/usr/local/lib` as well (where I installed Boost.Python) but that also didn't do the trick (I ran `ldconfig` and `ldconfig -n /usr/local/lib` too).
Can anyone give us a hand?
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
No source file or test is named in the issue. Reproduce the reported setup with bootstrap.sh, b2, and Python 3.11, then inspect where the built Python module is installed and why import Boost.Python cannot find it. Done means identifying a reproducible installation or configuration fix and confirming that the import succeeds.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- cpp, python
- 領域
- backend, build-system
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100