Curiously the FreeCAD build environment knew about InventorLoader, but of course the dependencies hadn't been installed by the Addon Manager, since I installed InventorLoader in my production version of FreeCAD.
Even after adjusting the path for python, I had to split the arguments sent to subprocess.call into a list so that it could actually find the executable.
The following patch fixes the issue:
--- InitGui.py.orig 2025-11-26 16:29:18
+++ InitGui.py 2025-11-26 16:27:03
@@ -13,5 +13,9 @@
module = os.path.join(os.path.dirname(EmptyFile.__file__), "libs", file)
python = os.path.join(os.path.dirname(sys.executable), os.path.basename(sys.executable).replace('FreeCAD', 'python'))
- subprocess.call(u"\"%s\" -m pip install \"%s\"" %(python, module))
+ if not os.path.exists(python):
+ python = os.path.normpath(os.path.join(os.path.dirname(sys.executable), "../../../.pixi/envs/default/bin/python"))
+ if not os.path.exists(python):
+ raise FileNotFoundError(f"Unable to find python interpreter: {python}")
+ subprocess.call([python, "-m", "pip", "install", module])
import os, subprocess, traceback, FreeCAD, FreeCADGui, EmptyFile
Curiously the FreeCAD build environment knew about InventorLoader, but of course the dependencies hadn't been installed by the Addon Manager, since I installed InventorLoader in my production version of FreeCAD.
Even after adjusting the path for
python, I had to split the arguments sent tosubprocess.callinto a list so that it could actually find the executable.The following patch fixes the issue: