Enter the location of an ANSYS executable (ansysXXX) #1288
-
I am new to PyMAPDL. I am following the ansys course tutorials. However whenever I try to call/import any function I get a message
I tried by manually adding the address to ANSYS222 and also tried using the suggested commands but nothing fixes the issue. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 16 replies
-
Hi @manarshhjot, I recently updated to v222 locally as well and had to just do this. I'm on Linux and MAPDL is installed in the default location at $ python
Python 3.9.13 (main, May 23 2022, 21:57:12)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ansys.mapdl.core import launch_mapdl
>>> mapdl = launch_mapdl(exec_file='/usr/ansys_inc/v222/ansys/bin/ansys222')
>>> print(mapdl)
Product: Ansys Mechanical Enterprise
MAPDL Version: 22.2
ansys.mapdl Version: 0.63.0 Since my default MAPDL was set to v22.1 (2022R1) I've updated my default path to the latest version with: >>> from ansys.mapdl.core.launcher import save_ansys_path
>>> save_ansys_path('/usr/ansys_inc/v222/ansys/bin/ansys222')
'/usr/ansys_inc/v222/ansys/bin/ansys222'
>>> mapdl = launch_mapdl(); print(mapdl)
Product: Ansys Mechanical Enterprise
MAPDL Version: 22.2
ansys.mapdl Version: 0.63.0 I'm going to update our docs and include an example for |
Beta Was this translation helpful? Give feedback.
-
Hi @manarshhjot Your path is a bit weird (the |
Beta Was this translation helpful? Give feedback.
-
from ansys.mapdl import core as pymapdl
new_path = "C:\\Program Files\\ANSYS Inc\\v212\\ANSYS\\bin\\winx64\\ansys222.exe"
pymapdl.change_default_ansys_path(new_path) https://mapdl.docs.pyansys.com/release/0.64/user_guide/launcher.html |
Beta Was this translation helpful? Give feedback.
Hi @manarshhjot,
I recently updated to v222 locally as well and had to just do this. I'm on Linux and MAPDL is installed in the default location at
/ansys_inc
on my machine, so launching MAPDL for me is just:Since my default MAPDL was set to v22.1 (2022R1) I've updated my default path to the latest versio…