Skip to content
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

Problems with installing GDML (Windows) #152

Open
KeithSloan opened this issue Nov 6, 2024 · 0 comments
Open

Problems with installing GDML (Windows) #152

KeithSloan opened this issue Nov 6, 2024 · 0 comments

Comments

@KeithSloan
Copy link
Owner

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 "<string>", 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 "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\Thomas\AppData\Roaming\FreeCAD\Mod\GDML\.\freecad\gdml\init_gui.py", line 44, in <module>
    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 <module>
    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant