Running cloudy from pyCloudy

91 views
Skip to first unread message

Mariela Martínez Paredes

unread,
Dec 5, 2016, 3:20:49 PM12/5/16
to pyCloudy
  
Hi Christophe

I am trying to run the exercise 6.2 in "The Nebulatom Cookbok" from the first NEBULATOM school, but I am finding the following error: 

   CloudyInput: Input written in CloudyModels/M_ISB_008_1.in      run_cloudy: running: cd CloudyModels ;  cloudy.exe /bin/sh: cloudy.exe: command not


I don't know which could be the problem. I installed cloudy,  pyCloudy and pyNeb. Why pyCloudy cannot find the cloudy.exe file?. I can call to cloudy from any directory in my computer.

Cheers and thanks!

Mariela

Christophe Morisset

unread,
Dec 5, 2016, 4:12:04 PM12/5/16
to pyCloudy
Hi Mariela,

It seems indeed that from within python the location of the cloudy.exe file is not known.
You can solve this issue in two ways:
1) define an environment variable CLOUDY_EXE that points to the location of the cloudy.exe file. It can be done in your .cshrc, .profile, .tcshrc, depending on your shell. Notice you have to try is it works from a new terminal, for the variable to be defined.
2) define the location of the cloudy.exe at the start of your program, just after you import pyCloudy:
import pyCloudy as pc
pc.config.cloudy_exe = 'WHERE IS YOUR cloudy.exe'

Hope it helps,
Chrisotphe
Reply all
Reply to author
Forward
0 new messages