stevenlovegrove / Pangolin

Pangolin is a lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input.
MIT License
2.37k stars 853 forks source link

-DPYTHON_INTERPRETER should be -DPython_INTERPRETER #786

Closed saippua closed 1 year ago

saippua commented 2 years ago

Just spend a couple of days trying to figure out why the D option -DPYTHON_INTERPRETER given in the readme wasn't working and cmake was always using python 2.7. Turns out the actual option should be -DPython_INTERPRETER (which works and finally lets me compile properly)

Im on an arm64 ubuntu 20.04 (Jetson Xavier NX). Im using cmake 3.16.3

stevenlovegrove commented 2 years ago

The readme on the master branch doesn't refer to -DPYTHON_INTERPRETER, only -DPYTHON_EXECUTABLE. Perhaps an old version of the readme did? If you found -DPYTHON_EXECUTABLE didn't work as expected, I would be interested to see the configure output. Thanks!

XiejiLi commented 1 year ago

Here is the output:

build git:(master) cmake .. -DPYTHON_EXECUTABLE=/Users/li/libs/anaconda3/envs/deeplearning/bin/python3
-- libpng Found and Enabled
-- libjpeg Found and Enabled
-- libtiff Found and Enabled
-- libopenexr Found and Enabled
-- liblz4 Found and Enabled
-- libzstd Found and Enabled
-- Found Eigen: '/opt/local/include/eigen3'
-- pybind11 v2.9.1 
-- Selected Python: '/Users/li/libs/anaconda3/envs/deeplearning/bin/python3'. cmake --build . -t pypangolin_pip_install to use pypangolin module.
-- libdc1394 Found and Enabled
-- ffmpeg Found and Enabled: /opt/local/include;/opt/local/include;/opt/local/include;/opt/local/include;/opt/local/include
-- libuvc Found and Enabled
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    PYTHON_EXECUTABLE

-- Build files have been written to: /Users/li/Documents/VUW/github/Pangolin/build
XiejiLi commented 1 year ago

and Here is the output by using -DPython_EXECUTABLE:

➜  build git:(master) cmake .. -DPython_EXECUTABLE=/Users/li/libs/anaconda3/envs/deeplearning/bin/python3
-- libpng Found and Enabled
-- libjpeg Found and Enabled
-- libtiff Found and Enabled
-- libopenexr Found and Enabled
-- liblz4 Found and Enabled
-- libzstd Found and Enabled
-- Found Eigen: '/opt/local/include/eigen3'
-- pybind11 v2.9.1 
-- Selected Python: '/Users/li/libs/anaconda3/envs/deeplearning/bin/python3'. cmake --build . -t pypangolin_pip_install to use pypangolin module.
-- libdc1394 Found and Enabled
-- ffmpeg Found and Enabled: /opt/local/include;/opt/local/include;/opt/local/include;/opt/local/include;/opt/local/include
-- libuvc Found and Enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/li/Documents/VUW/github/Pangolin/build
stevenlovegrove commented 1 year ago

Thanks for verifying @sisuy - I've updated the README accordingly.