Cannot import Boost.Python from Python 3.11
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- backend, build-system
Research direction
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.
Written by the indexing model from the issue text.
Description
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 "<stdin>", line 1, in <module>
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?
- Dominant language
- C++
- Stars
- 537
- Forks
- 223
- Avg merge
- 11h 22m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/python
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
BoostDetectToolset-1.90.0.cmake file not found in an include() call in boost_python-config.cmake Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100