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

FindPythonLibsNew.cmake always finds wrong python version #56

Closed
rancheng opened this issue Aug 16, 2021 · 2 comments
Closed

FindPythonLibsNew.cmake always finds wrong python version #56

rancheng opened this issue Aug 16, 2021 · 2 comments

Comments

@rancheng
Copy link

I always get the pybind find the wrong version of python, the output is:

-- PythonLibsNew_FIND_VERSION: 3.6
-- Found Python: /usr/bin/python3.6 (found suitable version "3.6.9", minimum required is "3.8") found components: Interpreter 

What I want is a virtual environment installed in /venv/bin/python3.8

@rancheng
Copy link
Author

I found this problem is introduced from pybind11, there is a duplicated issue:

#2154

This command solved this issue:

cmake .. -DPYTHON_EXECUTABLE=$(which python)

@rancheng
Copy link
Author

rancheng commented Aug 16, 2021

Here is the compiled library for python 3.8:

g2o.cpython-38-x86_64-linux-gnu.zip
pangolin.cpython-38-x86_64-linux-gnu.zip

decompress the zip files and copy the .so files to the system library:

copying ./g2o.cpython-38-x86_64-linux-gnu.so -> /venv/lib/python3.8/site-packages

and verify the library by run:

import g2o

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