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

[built error] find wrong python, was not declared in this scope #101

Closed
jasonppy opened this issue Sep 27, 2021 · 2 comments
Closed

[built error] find wrong python, was not declared in this scope #101

jasonppy opened this issue Sep 27, 2021 · 2 comments

Comments

@jasonppy
Copy link

jasonppy commented Sep 27, 2021

Hi Peter,

I'm trying to build it without Docker, as I need to make MatterSim available to the python in my anaconda envs. But when I cmake it, it's finding the system python, how do I change this?

Besides this, I got an error

Scanning dependencies of target MatterSim
[  9%] Building CXX object CMakeFiles/MatterSim.dir/src/lib/MatterSim.cpp.o
[ 36%] Building CXX object CMakeFiles/MatterSim.dir/src/lib/NavGraph.cpp.o
[ 36%] Building CXX object CMakeFiles/MatterSim.dir/src/lib/Benchmark.cpp.o
[ 36%] Building CXX object CMakeFiles/MatterSim.dir/src/lib/cbf.cpp.o
/home/Matterport3DSimulator/src/lib/NavGraph.cpp: In member function ‘void mattersim::NavGraph::Location::loadCubemapImages()’:
/home/Matterport3DSimulator/src/lib/NavGraph.cpp:59:89: error: ‘CV_LOAD_IMAGE_ANYDEPTH’ was not declared in this scope
         cv::Mat depth = cv::imread(skyboxDir + viewpointId + "_skybox_depth_small.png", CV_LOAD_IMAGE_ANYDEPTH);
                                                                                         ^~~~~~~~~~~~~~~~~~~~~~
/home/Matterport3DSimulator/src/lib/NavGraph.cpp:59:89: note: suggested alternative: ‘CV_MAT_DEPTH’
         cv::Mat depth = cv::imread(skyboxDir + viewpointId + "_skybox_depth_small.png", CV_LOAD_IMAGE_ANYDEPTH);
                                                                                         ^~~~~~~~~~~~~~~~~~~~~~
                                                                                         CV_MAT_DEPTH
CMakeFiles/MatterSim.dir/build.make:86: recipe for target 'CMakeFiles/MatterSim.dir/src/lib/NavGraph.cpp.o' failed
make[2]: *** [CMakeFiles/MatterSim.dir/src/lib/NavGraph.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/MatterSim.dir/all' failed
make[1]: *** [CMakeFiles/MatterSim.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Is it related to Depth images? I only downloaded matterport_skybox_images as it is said in the repo that this is minimal requirement for the simulator to work.

Thanks for your time!
Jason

@jasonppy
Copy link
Author

I've find a way to help it find the desired python version, by changing
cmake -DEGL_RENDERING=ON .. to

cmake -DEGL_RENDERING=ON .. -DPYTHON_LIBRARY=/dir_of_miniconda3/lib/libpython3.8.so \
-DPYTHON_INCLUDE_DIR=/dir_of_miniconda3/include/python3.8/ \
-DPYTHON_EXECUTABLE=/dir_of_miniconda3/bin/python \

and cmake ran successfully, but running make still gives the above error even if I have install depth images and camera parameters

@jasonppy
Copy link
Author

Problem solved by using Docker :)

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

1 participant