Skip to content

Conversation

@alex-luxonis
Copy link
Collaborator

With multiple python3 versions installed (side by side, or within Conda environments),
CMake's find_package always returned the latest (e.g. even if we specify 3.6, if 3.7 is found, it is used instead).
With an older python3 interpreter enabled as default, this was causing a wrong lib to be built, not the one expected by the selected python3 interpreter.

However, find_package has an option EXACT that would solve the above issue, but we don't want to hardcode a specific version.
We query the version from the python3 interpreter and pass it to find_package.

not the latest version (if multiple versions installed).
not only PythonLibs (PythonInterp is used anyway).
@Luxonis-Brandon
Copy link
Contributor

Will check shortly. This approach sounds great to me though. In previous one-off experiments I had been hard-coding with EXACT to get around this sort of thing (with drone app for example).

Copy link

@Luxonis-Steven Luxonis-Steven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the test. Looks great. Thanks!

@alex-luxonis alex-luxonis merged commit 1cec11f into master Jul 28, 2020
@alex-luxonis alex-luxonis deleted the python3_exact_version branch July 28, 2020 18:36
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

Successfully merging this pull request may close these issues.

4 participants