-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installed Addon not working on windows and Linux #52
Comments
Full About info please |
|
Ok that one is easy. Your version of ifcopenshell is not built for the same python version of FreeCAD (3.10). I don't know where your ifcopenshell comes from (is it included in the flatpack? that would be a serious problem). The easiest way is to head here: https://blenderbim.org/docs-python/ifcopenshell-python/installation.html and download a py3.10 version. You might need to find and remove the old one though. It should just be a matter of locating the 'ifcopenshell' folder and deleting it.
That one is less easy to debug because I don't have a windows install to check, but more than probably a similar reason: ifcopenshell not properly installed. Maybe try and grab a windows version from the page above (beware that your windows version uses python 3.8, not 3.10). |
The Windows one was easy I replaced the mentioned directory with the downloaded from blenderbim. |
We could do some investigating inside the BIM or NativeIFC addon and advise the user better on what to do... You could try this to know the ifcopenshell location: Inside the FreeCAD python console, type: import ifcopenshell
print(ifcopenshell.__file__) But maybe you can simply drop the new ifcopenshell folder somewhere FreeCAD will find it, ex. in one of the folders shown by this: import sys
for p in sys.path:
print(p) Hopefully it will override the flatpack one |
This command
create this output on FreeCAD on Flatpack
I found IfcOpenShell on |
At a glance it looks like a Flatpak issue. Perhaps a glibc incompatibility? Similar to IfcOpenShell/IfcOpenShell#2706 |
That's way above my abilities and skills. I'm not able to follow here. If you guide me I follow. But I'm not a developer. For me it's not anymore that important because I have a working FreeCAD on Windows. |
Does the flatpak version use local python libs? Could you check this @Mannshoch? import sys
for p in sys.path:
print(p) It could give us a hint to where to put another version of ifcopenshell... I'm not sure what can be done with the flatpak, @adrianinsaval might have an idea here? |
|
Ok thanks, that's interesting... So flatpak only considers its own subdirs, and the official system-wide python folders managed by the linux distribution. It discards the user-specific folders. So basically the only way to supply one's own version of IfcOpenShell is to install it system-wide (basically in /usr/lib/python3.10/site-packages). That's of course annoying because it requires superuser permissions and could interfere with what the distro's package manager does (in the case some day distros start providing IfcOpenShell). And even so I'm not 100% sure it will take precedence over the flatpak-supplied version. I'm not sure what can be done here, let's wait for Adrian to chime in |
Looking at this again, a possibility would be to install ifcopenshell in / |
flatpak should already include ifcopenshell, but if it's installable through pip it would make sense to put it in |
How do you envision this would work? |
the problem is that it's evolving very fast and would need to be updated more often by the user. Hm ifcopenshell is indeed available via pip. It lags a few versions behind: https://pypi.org/project/ifcopenshell/ but it should not be a problem (and users can request it to be updated there). Maybe that's the best option though, since all the complications of pip are now handled by the addon manager...
My idea was to get the ifcopenshell version, and compare with what's available on https://blenderbim.org/docs-python/ifcopenshell-python/installation.html and download and unzip the right package. But the pip way seems a lot better |
I found this and tried using
https://github.com/yorikvanhavre/FreeCAD-NativeIFC/blob/main/doc/installation.md
winget install FreeCAD.FreeCAD
(without root)No request for installing IfcOpenShell
flatpack install org.freecadweb.FreeCAD
Followed by a request to install IfcOpenShell - said YES
https://github.com/yorikvanhavre/FreeCAD-NativeIFC/blob/main/doc/installation.md
class 'ImportError'>: cannot import name 'api' from 'ifcopenshell' (C:\Users\%username%\AppData\Local\Programs\FreeCAD 0.21\bin\lib\site-packages\ifcopenshell\__init__.py)
<class 'ImportError'>: IfcOpenShell not built for 'linux/64bit/python3.10'
The text was updated successfully, but these errors were encountered: