Installing pyAnsys on local installation for ls-dyna out files (d3plot and binout) processing
My system: Windows 10 with local and server Ansys installation along with Anaconda3 (python 3.11, Spyder IDE).
I installed pyansys by issuing : python -m pip install pyansys
I try to verify the installation using the following lines from (https://dpf.docs.pyansys.com/version/0.10/getting_started/install.html):
from ansys.dpf.core import Model
from ansys.dpf.core import examples
model = Model(examples.find_simple_bar())
print(model)
I don't get any error from line 1 and line 2. However, line 3 issues several lines of warnings and an error. The last line would be the following:
OSError: Unable to launch the server after 3 attempts. Check the following path:
xxxx\ansys\v212
where the xxxx is the Ansys server installation path. However, the python or pyansys is not looking for local installation directory.
Question1: **Can I use any pyansys version ? or should the pyansys version be compatible with the ansys installation version e.g. ansys.dpf.core should be 0.3.0 ?
https://dpf.docs.pyansys.com/version/0.10/getting_started/compatibility.html#ref-compatibility
Question 2: If there is no compatibility issues, how to tell pyansys version to look for specific Ansys installation ? Is there any way in .py to specify the location of the ansys installation that pyansys should look for ?
Answers
-
Indeed it is very important to meet the client-server compatibility. The server is provided by the standard Ansys installation. To select which Ansys version (so, which server) you'll be using, you'll need to modify the environment variable:
0 -
Thank you verymuch for this info. Following your start_local_server() command, I figured out some leads on this: https://dpf.docs.pyansys.com/version/stable/user_guide/server_types.html
Thanks, if I am stuck I will seek your help.
1