jgerstmayr / EXUDYN

Multibody Dynamics Simulation: Rigid and flexible multibody systems
https://www.youtube.com/channel/UCsQD2bIPBXB_4J23WtqKkVw/playlists
Other
166 stars 23 forks source link

The issue of the ngsolve installation #31

Closed Jiang-Cui closed 1 year ago

Jiang-Cui commented 1 year ago

Dear Professor Johannes Gerstmayr,

I found that the python main files requiring the ngsolve such as NGsolveCraigBampton.py could not be run. The following error occurs.

File "D:\EXUDYN\main\pythonDev\Examples\NGsolveCraigBampton.py", line 71, in import ngsolve as ngs

File "D:\Program Files\ngsolve-v6.2.2203\lib\site-packages\ngsolve__init__.py", line 19, in import netgen

File "D:\Program Files\ngsolve-v6.2.2203\lib\site-packages\netgen__init__.py", line 17, in from . import libngpy

ImportError: DLL load failed

I try to reinstall the ngsolve using "pip install ngsolve", the following error shows.

ERROR: Could not find a version that satisfies the requirement ngsolve (from versions: none) ERROR: No matching distribution found for ngsolve

Could you help me solve this issue?

Thank you!

jgerstmayr commented 1 year ago

I need more information on Python version and platform (Windows, ...). On windows, ngsolve works best with Python 3.10. There are issues with Python 3.8. But this is not at my disposal, you could write this to ngsolve developers ... I also saw that it helps, if you try different ngsolve versions, e.g., install with "pip install ngsolve --pre"

Jiang-Cui commented 1 year ago

Many thanks for you, Professor!

The platform is windows. The python version is 3.10.3 using the code "python --version". I also install the python 3.7 in the platform.

"pip install ngsolve --pre" cannot work. The the following error still shows.

ERROR: Could not find a version that satisfies the requirement ngsolve (from versions: none) ERROR: No matching distribution found for ngsolve

jgerstmayr commented 1 year ago

I am using Python 3.10.8 within an environment. Maybe you need to update your Python version - it seems to be that you are using a quite old one. If doing "pip install ngsolve", I currently get version NGsolve-6.2.2301. Then I can run python NGsolveCMStutorial.py . I do everything within a Python environment, which may behave different from a direct Python installation.

Jiang-Cui commented 1 year ago

Professor, I have built a new environment including python 3.10 in Anoconda. The "pip install ngsolve" can work, and NGsolveCMStutorial.py can run in Spyder.Thank you very much!

However, another issue occurs! The main *.py file cannot be debugged through "main_sln_Template.sln". The error "The pdb file cannont be found" shows in the VS2017. Could you help me solve the new issue?