Hello,
how do I check the FC version I use under Linux using, preferably, a python command or, else, a shell command ?
check FC version on Linux using Python or Shell command
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: check FC version on Linux using Python or Shell command
in python:
but you would likely need to add the freecad lib directory to sys.path, you can also try import freecad instead as in some systems that is in the site-packages directory.
in shell, on of these:
the second does the same as the python commands above. Depending on your system you might have to use the lowercase form of that command, freecadcmd
What distro are you running and how did you install freecad?
Code: Select all
import FreeCAD
FreeCAD.Version()
in shell, on of these:
Code: Select all
FreeCADCmd --version
FreeCADCmd -c 'print(FreeCAD.Version())'
What distro are you running and how did you install freecad?
Re: check FC version on Linux using Python or Shell command
the distro is Ubuntu 20.04 LTS.
I upgrade FC 0.18 to 0.19 using PPA.
I have found a bash command which looks doing the job:
then I call it from python as a subprocess
I upgrade FC 0.18 to 0.19 using PPA.
I have found a bash command which looks doing the job:
Code: Select all
dpkg-query -W -f='${binary:Package} ${Version}\n' freecad
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: check FC version on Linux using Python or Shell command
are you interested in checking the version of FreeCAD in general or specifically of the deb package you have installed? btw the current stable release is 0.20.1 but it might not be in the ppa since nobody is maintaining that anymore, consider using a newer version through appimage/conda/flatpak/snap