KeithSloan / GDML

FreeCAD GDML Workbench - AddonManager Installable
Other
56 stars 17 forks source link

Problems with installing GDML (Windows) #152

Open KeithSloan opened 2 weeks ago

KeithSloan commented 2 weeks ago

Discussed in https://github.com/KeithSloan/GDML/discussions/143

Originally posted by **Korbart-droid** September 19, 2024 Hi, I tried - and failed - to install GDML following - if possible - the suggested steps from the user @poroserv as mentioned in the readme. Did anyone succeeded in the recent past with the installation of GDML and, if so, what did you do and which versions did you use? I read that the most recent versions of FC cause problems when trying to use GDML. Here's what I did that inevitably led to errors (problem is of course the guy sitting in front of the PC, but I gave my best): 1. Installation (only for me) of FreeCAD 0.20.2 to the directory E:\FreeCAD 0.20 2. Adding E:\FreeCAD 0.20\bin\Scripts to the System Variable PATH 3. Within cmd: `"E:\FreeCAD 0.20\bin\python.exe" -m pip install --upgrade pip` This successfully installed pip-24.2 `"E:\FreeCAD 0.20\bin\python.exe" -m pip install --target="E:\FreeCAD 0.20\bin\Lib\site-packages" --upgrade lxml` This successfully installed lxml-5.3.0 `"E:\FreeCAD 0.20\bin\python.exe" -m pip install --target="E:\FreeCAD 0.20\bin\Lib\site-packages" --upgrade gmsh` This suceessfully installed gmsh-4.13.1 `"E:\FreeCAD 0.20\bin\python.exe" -m pip install -i https://gmsh.info/python-packages --force-reinstall --no-cache-dir --upgrade --target="D:\FreeCAD 0.20\bin\Lib\site-packages" gmsh-dev` This failed with the message `ERROR: No matching distribution found for gmsh-dev` Then I downloaded Software Development Kit (SDK) for Windows of GMSH from https://gmsh.info/bin/Windows/gmsh-4.13.1-Windows64-sdk.zip , unpacked it and copied: ``` ..\bin to "E:\FreeCAD 0.20\bin\Lib\site-packages\bin" ..\include to "E:\FreeCAD 0.20\bin\Lib\site-packages\include" ..\lib to "E:\FreeCAD 0.20\bin\Lib\site-packages" ``` Afterwards I tried to install GDML via the Addon Manager but the routine tells me that the python module `pyg4ometry `is required. If I ignore this mesage, the installation runs through but after the restart of FreeCAD I receive the following error message: ``` During initialization the error "'type' object is not subscriptable" occurred in freecad.gdml -------------------------------------------------------------------------------- Traceback (most recent call last): File "", line 217, in InitApplications File "E:\FreeCAD 0.20\bin\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\Thomas\AppData\Roaming\FreeCAD\Mod\GDML\.\freecad\gdml\init_gui.py", line 44, in from freecad.gdml import GDMLCommands, GDMLResources File "E:\FreeCAD 0.20\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import return original_import(name, *args, **kwargs) File "C:\Users\Thomas\AppData\Roaming\FreeCAD\Mod\GDML\.\freecad\gdml\GDMLCommands.py", line 584, in class AddMaterial(QtGui.QDialog): File "C:\Users\Thomas\AppData\Roaming\FreeCAD\Mod\GDML\.\freecad\gdml\GDMLCommands.py", line 1013, in AddMaterial def addFormulaMaterial(self, compositionDict: dict[str, int]): TypeError: 'type' object is not subscriptable ``` I'd be thankful for every push towards the right direction. Thomas