Search found 2212 matches

by freman
Wed Mar 20, 2024 6:45 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3986

Re: [Fixed] site.getsitepackages() incorrect inside FreeCAD

Yes, I saw that. Is that any different from what I added to my local master and which did not seem to fix the problem?
viewtopic.php?p=748385#p748345
by freman
Wed Mar 20, 2024 4:49 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3986

Re: site.getsitepackages() incorrect inside FreeCAD

You must switch to your lib directory and then call ../bin/FreeCAD. This way FreeCADGui.so is already in the search path. Thanks, I get it now. CLI >>> FreeCADGui.showMainWindow() >>> FreeCADGui.exec_loop() FC python console: >>> import site >>> site.getsitepackages() ['/usr/local/lib64/python3.11/...
by freman
Wed Mar 20, 2024 4:41 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3986

Re: site.getsitepackages() incorrect inside FreeCAD

I just edited Interpreter.cpp void initInterpreter(int argc, char* argv[]) { PyStatus status; PyConfig config; PyConfig_InitIsolatedConfig(&config); config.isolated = 0; config.user_site_directory = 1; // ### fix missing /usr/local/lib* paths ran make , but it did not seem to fix it. FreeCAD pyt...
by freman
Wed Mar 20, 2024 4:15 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3986

Re: site.getsitepackages() incorrect inside FreeCAD

Two things you can test: As said above try to use FreeCAD as Python module. This won't call the init() function because the interpreter is already initialized. So, try these lines: import FreeCADGui FreeCADGui.showMainWindow() FreeCADGui.exec_loop() Then in the Python console of FreeCAD enter: impo...
by freman
Wed Mar 20, 2024 2:05 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3986

Re: site.getsitepackages() incorrect inside FreeCAD

Ah, many thanks, it looks like we are finally getting to the bottom of this.

Can you give me exactly what I need to do test this on my Fedora38 system. Does this need a conditional python version check if they have redefined basic behaviour?

Thx.
by freman
Wed Mar 20, 2024 7:20 am
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3986

Re: site.getsitepackages() incorrect inside FreeCAD

Thanks. I guess you are referring to this in the output from site.py USER_BASE: '/root/.local' (doesn't exist) USER_SITE: '/root/.local/lib/python3.11/site-packages' (doesn't exist) That is because I ran site.py from a root shell. If I run it as user it substitutes the /home/user equivalent. The key...
by freman
Sun Mar 17, 2024 7:51 am
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3986

Re: site.getsitepackages() incorrect inside FreeCAD

Well this is looking like an intractable mess. Python is circus, I guess that is what inspired the name. It seems to be evolving into a distro within a distro with it's own package management system. I guess I'll just have to resort to some local hacks with symlinks or similar to get my 3D paths back.
by freman
Sat Mar 16, 2024 6:45 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3986

Re: site.getsitepackages() incorrect inside FreeCAD

Thanks. Jumping in on p5 you seem to have missed a lot of what has been covered already.
by freman
Sat Mar 16, 2024 3:37 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3986

Re: site.getsitepackages() incorrect inside FreeCAD

Code: Select all

Loading Assembly workbench...
3.598535 <asm3.main> init_gui.py(14): no solver backend found
Why is asm3 in there ? Why is it autoloading?
BTW the backend error is expected I deliberaly pulled in clearing up pip stuff.
by freman
Sat Mar 16, 2024 1:01 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3986

Re: site.getsitepackages() incorrect inside FreeCAD

I've removed all add-ons, Edit Prefs have eliminated all WBs except sketcher . Restart FC, no change.


sys.flags.no_user_site = 0

This seems to be an immutable recognition that the current python executable was called with -s . Should I be looking for something starting a new python command ?