ich habe mir das PyAnsys Modul wie auf der Internetseite von PyAnsys beschrieben über
Code: Alles auswählen
pip install ansys.mapdl.core
Diese Installation funktionierte ohne Probleme.
Beim Starte mit Spyder Python und Test des folgenden Codes erschien unten dargestellte Fehlermeldung
Code: Alles auswählen
from ansys.mapdl.core import launch_mapdl
Code: Alles auswählen
mapdl = launch_mapdl()
Fehlermeldung:
Code: Alles auswählen
Traceback (most recent call last):
File "C:\Users....spyder-py3\untitled2.py", line 8, in
from ansys.mapdl.core import launch_mapdl
File "C:\Users...\Anaconda\lib\site-packages\ansys\mapdl\core_init_.py", line 26, in
from ansys.mapdl.core.launcher import (
File "C:\Users...\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py", line 19, in
from ansys.mapdl.core.mapdl import _MapdlCore
File "C:\Users...\Anaconda\lib\site-packages\ansys\mapdl\core\mapdl.py", line 16, in
from ansys.mapdl.reader.rst import Result
File "C:\Users...\Anaconda\lib\site-packages\ansys\mapdl\reader_init_.py", line 8, in
from ansys.mapdl.reader.archive import (Archive, write_cmblock, write_nblock,
File "C:\Users...\Anaconda\lib\site-packages\ansys\mapdl\reader\archive.py", line 20, in
from ansys.mapdl.reader import _reader, _archive
File "ansys\mapdl\reader\cython_reader.pyx", line 1, in init ansys.mapdl.reader._reader
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Numpy version: 1.20.1
Ansys version: 2020R2
PyMAPDL version: 0.61.3
Spyder version: 4.2.5
Python version: 3.8.8
Ich kann mir leider nicht erklären was da nicht stimmt. Eventuell liegt es an der Numpy Version?
So ähnlich müsste übrigens das korrekte Ausgabe des Codes in Python aussehen:
Code: Alles auswählen
Product: ANSYS Mechanical Enterprise
MAPDL Version: RELEASE 2021 R1 BUILD 21.0
PyMAPDL Version: Version: 0.58.0
Beste Grüße
herttim