My real question was, why might the value be set to something other than 3.9 on this machine...and why was it set to a value that worked 2 days ago, and why is it defined on a system so that this is picked up cmake (if cmake is picking it up from the system). If it is the system, what is wrong with the Python setup. (When I type python at the command line it finds 3.9)
[Solved] Build fail, python version
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Build fail, python version
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Build fail, python version
Those questions are much more mysterious -- the only thing that changed (in that regard) recently is the required version string going up to the new standard. As for how/why it is "finding" a version of Python that met the old standard, but not the new, on a system without that version, I don't know. To eliminate any possible conflicts from within FreeCAD as possible sources of error, maybe we could create a stripped down cMake script you can run on your system to get just the output of
Code: Select all
find_package (Python COMPONENTS Interpreter)
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Build fail, python version
debian's versions of python are a huge PITA...
Re: Build fail, python version
I am still sure, that you have some remain anywhere. When you add in the line, does it occur? Have you looked in the synaptic package manger, have you done apt-get autoremove (and apt-get autoclean)?
Just as note, can happen, that cmake config can be faulty when it changes by its source after too much changes. Time to time it is good to make a complete new build from scratch. Also i would add -DFREECAD_BUILD_DEBIAN = 1 , -DFREECAD_USE_PYBIND11 = 1 .
So far no problem on Debian 11 (generally Debian 11 is stable af). The former version with the change from python2 to python3 was sometimes bumpy for me, but i am not an expert, just a user.
Greetings
user1234
Re: Build fail, python version
I can find no hint of anything but the python 3.9 on this system.user1234 wrote: ↑Thu Jan 26, 2023 12:09 am ...
I am still sure, that you have some remain anywhere. When you add in the line, does it occur? Have you looked in the synaptic package manger, have you done apt-get autoremove (and apt-get autoclean)?
Just as note, can happen, that cmake config can be faulty when it changes by its source after too much changes. Time to time it is good to make a complete new build from scratch. Also i would add -DFREECAD_BUILD_DEBIAN = 1 , -DFREECAD_USE_PYBIND11 = 1 .
Adding FREECAD_BUILD_DEBIAN and FREECAD_USE_PYBIND11 changed nothing.
And that is my issue here. This Debian 11 machine has built FreeCAD with a daily git pull daily for the last year. No issues with python. With none of the extra make directives discussed so far. Until the git pull included the new test code for python 3.8 or greater....
So far no problem on Debian 11 (generally Debian 11 is stable af). The former version with the change from python2 to python3 was sometimes bumpy for me, but i am not an expert, just a user.
...
The question is what does cmake want that it is not finding? I have a second Debian 11 machine, with what appears to be the same python3.9 installation. I use the same bash script on both machines. It has for months worked fine, with no special consideration for python on both machines. Now on one it doesn't work.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Build fail, python version
@user1234 @chennes
Well, I am befuddled. And, embarrassed.
As I've said, build on this machine has worked for months. And, I could not find version of Python other than 3.9...that is in all places I expected to find Python.
There was a version of 3.7m in /usr/local/bin. No clue how that got there.
Obviously the build had been proceeding fine with finding that, until check for 3.8 or greater was added...
Should have started with a system wide "find".
Sorry for wasting the bandwidth.
Well, I am befuddled. And, embarrassed.
As I've said, build on this machine has worked for months. And, I could not find version of Python other than 3.9...that is in all places I expected to find Python.
There was a version of 3.7m in /usr/local/bin. No clue how that got there.
Obviously the build had been proceeding fine with finding that, until check for 3.8 or greater was added...
Should have started with a system wide "find".
Sorry for wasting the bandwidth.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Build fail, python version
I'm just glad you solved it, I was running out of ideas!
Re: [Solved] Build fail, python version
I could not care less, as long it works.
But have 2 concerns.
- Why does it not work when you define python3.8? Even when an older is installed, it should work anyway.
- If you have not installed python3.7, why is a binary on the system? Have you added/deleted/modified some files per hand with root rights in the system?
Greetings
user1234
But have 2 concerns.
- Why does it not work when you define python3.8? Even when an older is installed, it should work anyway.
- If you have not installed python3.7, why is a binary on the system? Have you added/deleted/modified some files per hand with root rights in the system?
Greetings
user1234
Re: [Solved] Build fail, python version
Do you mean when the make directive specified? This is a good question. I would have expected that to override, but I suspect the new merged check doesn't take the directive into account?
TBH, after finding it, my recollection of why it is was there is not clear. I think at one point I was trying to get a version of FreeCAD and Blender who's Python major/minor rev matched so Sverchok nodes would work. Why it would have been partially un-installed is also un-clear. Since both FreeCAD and Blender have moved to 3.8 or greater.- If you have not installed python3.7, why is a binary on the system? Have you added/deleted/modified some files per hand with root rights in the system?
...
I have removed all traces of 3.7 (I think) and nothing has broken so far.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: [Solved] Build fail, python version
The recent tweaks to cMake should move the Python detection to use the standardized find_package architecture. To set the Python location manually, you should set "Python_ROOT_DIR" to the path to your Python installation.