Comments (15)
Full About info please
from freecad-nativeifc.
- Linux:
OS: KDE Flatpak runtime (ubuntu:GNOME/ubuntu-xorg)
Word size of FreeCAD: 64-bit
Version: 0.21.1.33694 (Git)
Build type: Release
Branch: (HEAD detached at f670854)
Hash: f6708547a9bb3f71a4aaade12109f511a72c207c
Python 3.10.12, Qt 5.15.10, Coin 4.0.0, Vtk 8.2.0, OCC 7.6.3
Locale: German/Switzerland (de_CH)
Installed mods:
* FreeCAD-NativeIFC 2022.10.20
* BIM 2021.12.0
- Windows:
OS: Windows 11 build 22621
Word size of FreeCAD: 64-bit
Version: 0.21.1.33668 +26 (Git)
Build type: Release
Branch: (HEAD detached at 0.21.1)
Hash: f6708547a9bb3f71a4aaade12109f511a72c207c
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Switzerland (de_CH)
Installed mods:
* Assembly3 0.12.0
* BIM 2021.12.0
* dodo 1.0.0
* FreeCAD-NativeIFC 2022.10.20
* sheetmetal 0.2.63
from freecad-nativeifc.
Linux: <class 'ImportError'>: IfcOpenShell not built for 'linux/64bit/python3.10'
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.
Windows: class 'ImportError'>: cannot import name 'api' from 'ifcopenshell' (C:\Users%username%\AppData\Local\Programs\FreeCAD 0.21\bin\lib\site-packages\ifcopenshell_init_.py)
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).
from freecad-nativeifc.
The Windows one was easy I replaced the mentioned directory with the downloaded from blenderbim.
On the other side. I do not know how Flatpak works and where to replace a directory.
from freecad-nativeifc.
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
from freecad-nativeifc.
This command
import ifcopenshell
print(ifcopenshell.__file__)
create this output on FreeCAD on Flatpack
import ifcopenshell
Traceback (most recent call last):
File "/app/lib/python3.10/site-packages/ifcopenshell/__init__.py", line 54, in <module>
from . import ifcopenshell_wrapper
File "/app/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/app/lib/python3.10/site-packages/ifcopenshell/ifcopenshell_wrapper.py", line 13, in <module>
from . import _ifcopenshell_wrapper
File "/app/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 142, in _import
return original_import(name, *args, **kwargs)
ImportError: /app/lib/python3.10/site-packages/ifcopenshell/_ifcopenshell_wrapper.so: undefined symbol: _ZTV13HdfSerializer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/app/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/app/lib/python3.10/site-packages/ifcopenshell/__init__.py", line 62, in <module>
raise ImportError("IfcOpenShell not built for '%s'" % python_distribution)
ImportError: IfcOpenShell not built for 'linux/64bit/python3.10'
>>> print(ifcopenshell.__file__)# Gui.runCommand('Std_Open',0)
I found IfcOpenShell on
~/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/AdditionalPythonPackages/py310/ifcopenshell
/var/lib/flatpak/app/org.freecadweb.FreeCAD/current/active/files/lib/python3.10/site-packages/ifcopenshell
from freecad-nativeifc.
At a glance it looks like a Flatpak issue. Perhaps a glibc incompatibility? Similar to IfcOpenShell/IfcOpenShell#2706
from freecad-nativeifc.
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.
from freecad-nativeifc.
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?
from freecad-nativeifc.
/home/USERNAME/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/Mod/BIM/./
/home/USERNAME/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/Mod/BIM
/home/USERNAME/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/Mod/FreeCAD-NativeIFC/./
/home/USERNAME/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/Mod/FreeCAD-NativeIFC
/app/freecad/Mod/Web
/app/freecad/Mod/Tux
/app/freecad/Mod/Test
/app/freecad/Mod/TechDraw
/app/freecad/Mod/Surface
/app/freecad/Mod/Start
/app/freecad/Mod/Spreadsheet
/app/freecad/Mod/Sketcher
/app/freecad/Mod/Show
/app/freecad/Mod/Robot
/app/freecad/Mod/ReverseEngineering
/app/freecad/Mod/Points
/app/freecad/Mod/Plot
/app/freecad/Mod/Path
/app/freecad/Mod/PartDesign
/app/freecad/Mod/Part
/app/freecad/Mod/OpenSCAD
/app/freecad/Mod/MeshPart
/app/freecad/Mod/Mesh
/app/freecad/Mod/Measure
/app/freecad/Mod/Material
/app/freecad/Mod/Inspection
/app/freecad/Mod/Import
/app/freecad/Mod/Idf
/app/freecad/Mod/Fem
/app/freecad/Mod/Draft
/app/freecad/Mod/Arch
/app/freecad/Mod/AddonManager
/app/freecad/Mod
/app/freecad/lib
/app/freecad/Ext
/usr/lib/python310.zip
/usr/lib/python3.10
/usr/lib/python3.10/lib-dynload
/app/lib/python3.10/site-packages
/usr/lib/python3.10/site-packages
/home/USERNAME/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/AdditionalPythonPackages/py310
/home/USERNAME/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/AdditionalPythonPackages
/home/USERNAME/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/Macro/
/home/USERNAME/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/Macro
/app/freecad/Macro
/app/lib/python3.10/site-packages/ifcopenshell/lib/linux/64bit/python3.10
from freecad-nativeifc.
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
from freecad-nativeifc.
Looking at this again, a possibility would be to install ifcopenshell in /home/USERNAME/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/Mod/
... But I'm also looking at how to build a better system from within the BIM WB to allow users to install and update ifcopenshell.
from freecad-nativeifc.
flatpak should already include ifcopenshell, but if it's installable through pip it would make sense to put it in /home/USERNAME/.var/app/org.freecadweb.FreeCAD/data/FreeCAD/AdditionalPythonPackages/py310
from freecad-nativeifc.
But I'm also looking at how to build a better system from within the BIM WB to allow users to install and update ifcopenshell.
How do you envision this would work?
from freecad-nativeifc.
flatpak should already include ifcopenshell
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...
How do you envision this would work?
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
from freecad-nativeifc.
Related Issues (20)
- FreeCAD freeze when moving IFC object HOT 9
- Drag & Drop failed - no module named 'ifcopenshell.api.spatial.unassigned_container' HOT 7
- Get rid of the dummy 1x1x1 cube HOT 1
- Handle furniture
- Make boolean objects editable HOT 6
- Background process for Native IFC? HOT 4
- AttributeError: 'NoneType' object has no attribute 'addObject' HOT 3
- Error Message on opening an IFC Native HOT 5
- <class 'ValueError'>: too many values to unpack (expected 2) HOT 5
- Enhancement Request - move Dialog in Task Area, add Stats window and create a Native IFC feature HOT 6
- import ifcopenshell failed with error "signed with custom identity or adhoc?" on the macOS M1 HOT 1
- Add a Part or PartDesign object to a IFC HOT 5
- Support IFC4.3.2 for infrastructure? HOT 6
- [Issue] Lock an unlocked file with more then one IfcProject inside HOT 2
- [Issue] Document containing an IfcProject and FreeCAD objects HOT 3
- [Issue?] Weired "save-behavior" with new IFC-doc (strict IFC mode)
- aggregate() continues even though get_ifcfile() returns None HOT 2
- Addon is not working on version 0.21.1
- Unable to save IFC file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freecad-nativeifc.