Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py:module_ has not been declared #869

Closed
mgrallos opened this issue May 25, 2023 · 13 comments
Closed

py:module_ has not been declared #869

mgrallos opened this issue May 25, 2023 · 13 comments

Comments

@mgrallos
Copy link

/home/asimov-hawks/tellovisual_ws/src/Pangolin/components/pango_python/src/pyinterpreter.cpp:61:27: error: ‘py::module_’ has not been declared
61 | auto pypangolin = py::module_::import("pypangolin");
| ^~~~~~~
/home/asimov-hawks/tellovisual_ws/src/Pangolin/components/pango_python/src/pyinterpreter.cpp:63:20: error: ‘py::module_’ has not been declared
63 | auto sys = py::module_::import("sys");

@TheSeanParker
Copy link

/home/asimov-hawks/tellovisual_ws/src/Pangolin/components/pango_python/src/pyinterpreter.cpp:61:27: error: ‘py::module_’ has not been declared 61 | auto pypangolin = py::module_::import("pypangolin"); | ^~~~~~~ /home/asimov-hawks/tellovisual_ws/src/Pangolin/components/pango_python/src/pyinterpreter.cpp:63:20: error: ‘py::module_’ has not been declared 63 | auto sys = py::module_::import("sys");

could you show your code?maybe somebody will know the specify problem

@wangfei-tech
Copy link

@mgrallos Is your problem solved? @TheSeanParker I followed the steps in the readme,I also encountered the same problem. The environment I use is ubuntu20.04 installed in the vmware16.0pro.My problem is:

cmake --build build
[ 80%] Built target tinyobj
[ 80%] Built target pango_core
[ 80%] Built target pango_image
[ 80%] Built target pango_opengl
[ 80%] Built target pango_windowing
[ 80%] Built target pango_vars
[ 80%] Built target pango_display
[ 80%] Built target pango_geometry
[ 80%] Built target pango_glgeometry
[ 80%] Built target pango_packetstream
[ 80%] Built target pango_video
[ 80%] Built target pango_scene
[ 80%] Built target pango_plot
[ 80%] Built target pypangolin
[ 80%] Built target pango_tools
[ 80%] Building CXX object CMakeFiles/pango_python.dir/components/pango_python/src/pyinterpreter.cpp.o
/home/wf/slam_in_autonomous_driving/thirdparty/Pangolin/components/pango_python/src/pyinterpreter.cpp: In constructor ‘pangolin::PyInterpreter::PyInterpreter()’:
/home/wf/slam_in_autonomous_driving/thirdparty/Pangolin/components/pango_python/src/pyinterpreter.cpp:61:27: error: ‘py::module_’ has not been declared
   61 |     auto pypangolin = py::module_::import("pypangolin");
      |                           ^~~~~~~
/home/wf/slam_in_autonomous_driving/thirdparty/Pangolin/components/pango_python/src/pyinterpreter.cpp:63:20: error: ‘py::module_’ has not been declared
   63 |     auto sys = py::module_::import("sys");
      |                    ^~~~~~~
make[2]: *** [CMakeFiles/pango_python.dir/build.make:63: CMakeFiles/pango_python.dir/components/pango_python/src/pyinterpreter.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:794: CMakeFiles/pango_python.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

@wangfei-tech
Copy link

@mgrallos Is your problem solved? @TheSeanParker I followed the steps in the readme,I also encountered the same problem. The environment I use is ubuntu20.04 installed in the vmware16.0pro.My problem is:

cmake --build build
[ 80%] Built target tinyobj
[ 80%] Built target pango_core
[ 80%] Built target pango_image
[ 80%] Built target pango_opengl
[ 80%] Built target pango_windowing
[ 80%] Built target pango_vars
[ 80%] Built target pango_display
[ 80%] Built target pango_geometry
[ 80%] Built target pango_glgeometry
[ 80%] Built target pango_packetstream
[ 80%] Built target pango_video
[ 80%] Built target pango_scene
[ 80%] Built target pango_plot
[ 80%] Built target pypangolin
[ 80%] Built target pango_tools
[ 80%] Building CXX object CMakeFiles/pango_python.dir/components/pango_python/src/pyinterpreter.cpp.o
/home/wf/slam_in_autonomous_driving/thirdparty/Pangolin/components/pango_python/src/pyinterpreter.cpp: In constructor ‘pangolin::PyInterpreter::PyInterpreter()’:
/home/wf/slam_in_autonomous_driving/thirdparty/Pangolin/components/pango_python/src/pyinterpreter.cpp:61:27: error: ‘py::module_’ has not been declared
   61 |     auto pypangolin = py::module_::import("pypangolin");
      |                           ^~~~~~~
/home/wf/slam_in_autonomous_driving/thirdparty/Pangolin/components/pango_python/src/pyinterpreter.cpp:63:20: error: ‘py::module_’ has not been declared
   63 |     auto sys = py::module_::import("sys");
      |                    ^~~~~~~
make[2]: *** [CMakeFiles/pango_python.dir/build.make:63: CMakeFiles/pango_python.dir/components/pango_python/src/pyinterpreter.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:794: CMakeFiles/pango_python.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

I have already solved this problem, I use the zip file given to me by others, and then decompress it, and the problem does not appear after following the readme operation.

@TangMinLeo
Copy link

@wangfei-tech what zip file you used to solve this problem? can you share it ?

1 similar comment
@ue007
Copy link

ue007 commented Aug 15, 2023

@wangfei-tech what zip file you used to solve this problem? can you share it ?

@qwert12131990
Copy link

qwert12131990 commented Aug 15, 2023 via email

@ue007
Copy link

ue007 commented Aug 15, 2023

@TangMinLeo sudo git submodule update --init

@chenshengxyz
Copy link

I solved the problem by replacing the version of Pangolin. The initial version I had was 0.8, and I replaced it with version 0.6, which didn't have this issue.

@iphylq
Copy link

iphylq commented Sep 26, 2023

you should update your pybind11 to v2.11 or before, i just use v2.11 to work good.

@furkansariyildiz
Copy link

I solved the problem by replacing the version of Pangolin. The initial version I had was 0.8, and I replaced it with version 0.6, which didn't have this issue.

Yea, it is removing error when i try to colcon build --symlink-install --packages-select pangolin

@ErnestF22
Copy link

Had the same compilation error while building version 0.9.1 of Pangolin (SDV-LOAM dependency) on Ubuntu 20.04. Made it work by using Pangolin 0.6.

@christian-rauch
Copy link
Collaborator

Is this still an issue on the current master (i.e. with #906)? The CI builds the pango_python component without an issue: https://github.com/stevenlovegrove/Pangolin/actions/runs/7820164725/job/21334232895.

@zhaoxiaoxin
Copy link

参考博客 https://www.jianshu.com/p/fc61bf01a3d9 可以解决这个问题

@christian-rauch christian-rauch closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests