ansys / pyrocky

A Python API for Ansys Rocky
https://rocky.docs.pyansys.com/
MIT License
4 stars 0 forks source link

launcher.py not working in Linux #55

Open manuelmoncada opened 5 months ago

manuelmoncada commented 5 months ago

🔍 Before submitting the issue

🐞 Description of the bug

When I try to open Rocky from Python with pyrocky.launch_rocky(), it cannot find the Rocky binary file, because the AWP_ROOT enviaroment variable is not defined by default in the installation

Traceback (most recent call last): File "", line 1, in File "/opt/pyrocky/lib/python3.11/site-packages/ansys/rocky/core/launcher.py", line 78, in launch_rocky raise FileNotFoundError("Rocky executable is not found.") FileNotFoundError: Rocky executable is not found.

📝 Steps to reproduce

import ansys.rocky.core as pyrocky rocky = pyrocky.launch_rocky()

💻 Which operating system are you using?

Linux

📀 Which ANSYS version are you using?

Ansys Rocky 2024 R1.1

🐍 Which Python version are you using?

3.11

📦 Installed packages

ansys-rocky-core==0.1.0
importlib_metadata==7.1.0
numpy==1.26.4
Pyro5==5.15
serpent==1.41
zipp==3.18.1
igortg commented 3 months ago

Hi @manuelmoncada

Sorry that we took so long to respond. The workaround right now is to manually set rocky_exe parameter for launch_rocky.

rocky = pyrocky.launch_rocky(rocky_exe='/ansys_inc/v241/rocky/bin/Rocky')