Closed obackhouse closed 2 months ago
This error is occuring on line 31 from the commit.
find_package(Python3 REQUIRED COMPONENTS Development Interpreter)
The previous line before that had
find_package(Python 3.11 EXACT COMPONENTS Development Interpreter)
The three main differences is:
-- the old version required an installation of python 3.11 somewhere in the system, so that version of python would be used instead of the intended one. Using Python3 is the ideal standard after cmake 3.12 so that cmake avoids finding python 2.
-- adding the REQUIRED flag so that CMake fails at that step if not all the components are found. This could be better replaced with a check for $Python3_FOUND and printing more helpful debug information.
-- overrides PYTHON variables to use the found python3 paths.
Did you ever clear your CMakeCache after pulling the new changes?
I think before your cmake was forced to use python 3.11 for the libraries (as shown in the error message), but it should have been python 3.10 based on your current environment. The cache may not be resetting that information.
Here are a couple of suggestions:
-- Clear CMake Cache:
python setup.py clean
Or delete the build directory if compiling that way
-- Remove REQUIRED Flag: You can also try removing the REQUIRED flag from the find_package call and see if everything still works:
find_package(Python3 COMPONENTS Development Interpreter)
I'll make the change for the REQUIRED flag either way to give more helpful information.
Another note: it seems like your python3.10 doesn't have the necessary development libraries for pybind11 to work. You might have only had them installed for 3.11 since that's the latest version of python in Ubuntu. You can do that with
sudo apt-get install python3.10-dev
Probably the easiest solution would be to install python 3.11 within your conda environment and use that.
conda install python=3.11
Thanks, I'll try it with the changes. I do have the development libraries for 3.10.
48 seems to have made my system not able to find python when it was fine before:
Everything installs fine with
Versions: