Search found 2212 matches

by freman
Sat Mar 16, 2024 12:22 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3981

Re: site.getsitepackages() incorrect inside FreeCAD

Code: Select all

pip list | wc -l
103
Most of that seems to be the distro packet manager's doing. I had a couple for freecad plot aircraft WB, and py_slvs for assy3.

Looks like a bit of a Gordian knot.
by freman
Sat Mar 16, 2024 9:02 am
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3981

Re: site.getsitepackages() incorrect inside FreeCAD

If I start the command line python shell with either of those conditions it does have the expected results on these variables. wmeyer reported it did not make any difference in his distro ( not sure what he's running ). or maybe altering the sys.path deleting the user-site directory from it could be...
by freman
Sat Mar 16, 2024 8:39 am
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3981

Re: site.getsitepackages() incorrect inside FreeCAD

Since this is a readonly attribute, it is presumably not what I should be searching for the code setting it. Allegedly this is directly reporting python command line option -s , so not writeable. Presumably that means it cannot be overwritten internally by any python modules either. https://www.ense...
by freman
Fri Mar 15, 2024 7:41 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3981

Re: site.getsitepackages() incorrect inside FreeCAD

Code: Select all

>>> sys.flags.no_user_site
1
Well at least we have found the direct cause of the path truncation. Now to find the cause of the cause :?
by freman
Fri Mar 15, 2024 3:45 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3981

Re: site.getsitepackages() incorrect inside FreeCAD

Code: Select all

sys.flags.no_user_site = 0
Traceback (most recent call last):
  File "<input>", line 1, in <module>
AttributeError: readonly attribute
EDIT:
You should additionally search in $HOME/.local/lib
Zip.
by freman
Fri Mar 15, 2024 3:10 pm
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3981

Re: site.getsitepackages() incorrect inside FreeCAD

OK, I don't see anything setting it: $cd /usr/lib64/python3.11 $ grep -nR "no_user_site" site.py:252: if sys.flags.no_user_site: grep: site-packages/ocl.so: No such file or directory grep: __pycache__/site.cpython-311.pyc: binary file matches grep: __pycache__/site.cpython-311.opt-2.pyc: b...
by freman
Fri Mar 15, 2024 11:25 am
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3981

Re: site.getsitepackages() incorrect inside FreeCAD

FC >>> sys.flags.no_user_site 1 $ python Python 3.11.8 (main, Feb 7 2024, 00:00:00) [GCC 13.2.1 20231011 (Red Hat 13.2.1-4)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.flags.no_user_site 0 >>> the val...
by freman
Fri Mar 15, 2024 10:03 am
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3981

Re: site.getsitepackages() incorrect inside FreeCAD

Code: Select all

>>> site.ENABLE_USER_SITE = True
>>> site.getsitepackages()
['/usr/lib64/python3.11/site-packages', '/usr/lib/python3.11/site-packages']
>>> 
No. :(
by freman
Fri Mar 15, 2024 10:01 am
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3981

Re: site.getsitepackages() incorrect inside FreeCAD

>>> site.check_enableusersite() False >>> import sys >>> sys.flags.no_user_site 1 >>> import os >>> hasattr(os, "getuid") and hasattr(os, "geteuid") True >>> os.geteuid() == os.getuid() True >>> hasattr(os, "getgid") and hasattr(os, "getegid") True >>> os.get...
by freman
Fri Mar 15, 2024 9:44 am
Forum: Install / Compile
Topic: [Fixed] site.getsitepackages() incorrect inside FreeCAD
Replies: 62
Views: 3981

Re: site.getsitepackages() incorrect inside FreeCAD

FC:

Code: Select all

site.ENABLE_USER_SITE
False
python shell:

Code: Select all

>>> site.ENABLE_USER_SITE
True
>>>