This leads to a dead end when an import fails because it does not define a module export function according to Python: ImportError: dynamic module does not define module export function (PyInit_libnghttp2) When importing these dependencies explicitly, each of them have the same issue. In both cases the virtual environment detects where FreeCAD.so is located, but fails to find any of its dependencies, even when located in the same folder. In another attempt, I copied the contents of a FreeCAD flatpak install, as it should contain all the libraries that FreeCAD depends on.Īfter placing the libraries to be imported in the virtual maching folder, I have pointed to them with () as well as P圜harm's Project Structure tool in various attempts. deb packages from Debian, taking care to get the correct versions required by each dependency. In one attempt, I downloaded and unpacked. I started out with FreeCAD documentation for embedding in scripts as a basis: I am working in P圜harm 2021.1.1 with Python 3.8 in virtualenv on Debian 10. I hope a Python virtual environment can make that possible. I would like to avoid using the FreeCAD GUI as well as being dependent on having FreeCAD installed on the system, when working with Python scripts that use FreeCAD libraries to create and modify 3D geometry. How do I setup a Python virtual environment with the FreeCAD library embedded as to enable import as a module into scripts?
0 Comments
Leave a Reply. |