Skip to content

pybind finds old versions of python #30

@jcoulter12

Description

@jcoulter12

Hi xfac developers,

Because of this issue with pybind11:

pybind/pybind11#4785

when installing xfac python bindings, it's possible to have the .so file in build/python stuck using an undesired version of python.

I'm just opening an issue to let you know that this can be easily worked around by modifying extern/pybind11/CMakeLists.txt to add two lines with a version of python higher than the undesired version (for example, in my case I was getting stuck with python 3.6 even though which python provided python 3.10).

if(NOT CMAKE_VERSION VERSION_LESS "3.27")
  find_package(PythonInterp 3.10 REQUIRED)
  find_package(PythonLibs 3.10 REQUIRED)
  cmake_policy(GET CMP0148 _pybind11_cmp0148)
endif()

You may find a better way, but just in case I think it is worth mentioning this in case it affects other users. Feel free to close the issue once you've noted it.
Best,
Jenny

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions