borglab / borglab/wrap

python-install fails because of stubgen:

Open
#167 13 comments 0 reactions 1 assignee Claimed by @varunagrawal View on GitHub
Dominant language
C++
Stars
37
Forks
17
Avg merge
1d 4h
Merged PRs (30d)
9

Description

I am in a python3 conda environment, on MacOS 14.6.1,

(py310) (base) macbook-pro-8:build dellaert$ python --version
Python 3.10.14

```
Traceback (most recent call last):
File "/Users/dellaert/miniforge3/envs/py310/bin/pybind11-stubgen", line 8, in
sys.exit(main())
File "/Users/dellaert/miniforge3/envs/py310/lib/python3.10/site-packages/pybind11_stubgen/__init__.py", line 319, in main
run(
File "/Users/dellaert/miniforge3/envs/py310/lib/python3.10/site-packages/pybind11_stubgen/__init__.py", line 358, in run
QualifiedName.from_str(module_name), importlib.import_module(module_name)
File "/Users/dellaert/miniforge3/envs/py310/lib/python3.10/importlib/__init__.py", line 126, in import_module
Traceback (most recent call last):
return _bootstrap._gcd_import(name[level:], package, level) File "/Users/dellaert/miniforge3/envs/py310/bin/pybind11-stubgen", line 8, in

File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
sys.exit(main())
File "/Users/dellaert/miniforge3/envs/py310/lib/python3.10/site-packages/pybind11_stubgen/__init__.py", line 319, in main
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
run(
File "/Users/dellaert/miniforge3/envs/py310/lib/python3.10/site-packages/pybind11_stubgen/__init__.py", line 358, in run
File "/Users/dellaert/git/github/build/python/gtsam_unstable/__init__.py", line 1, in
QualifiedName.from_str(module_name), importlib.import_module(module_name)
File "/Users/dellaert/miniforge3/envs/py310/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
from .gtsam_unstable import *
ModuleNotFoundError: No module named 'gtsam_unstable.gtsam_unstable'
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/dellaert/git/github/build/python/gtsam/__init__.py", line 9, in
from gtsam import gtsam, utils
ImportError: cannot import name 'gtsam' from partially initialized module 'gtsam' (most likely due to a circular import) (/Users/dellaert/git/github/build/python/gtsam/__init__.py)
make[3]: *** [python/CMakeFiles/python-unstable-stubs] Error 1
make[3]: *** [python/CMakeFiles/python-stubs] Error 1
make[2]: *** [python/CMakeFiles/python-unstable-stubs.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [python/CMakeFiles/python-stubs.dir/all] Error 2
make[1]: *** [python/CMakeFiles/python-install.dir/rule] Error 2
make: *** [python-install] Error 2
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.