I've just started using illustris and am trying to follow the python tutorial on http://www.illustris-project.org/data/docs/scripts/
I'v done the first box creating the directories, however, when it comes to importing the package illustrious_python I get the error "No module named illustris_python" can anyone help with this?
I had the same problem; because there is no setup.py to install the scripts you have to manually add a path to your python path so that python can always find the illustris_python programs. I did so by adding this at the top of my python script:
import site
site.addsitedir(path-to-where-illustris_python-folder-is)
import illustris_python as il
where path-to-where-illustris_python-folder-is is a string giving the directory where illustris_python/ is. Hope that helps.
Karen
Grace O'Dwyer
30 Sep '16
I am a high school student interested in accessing data for a research project through Illustris’ web API. I’ve decided to use Python as my language but that is about as far as I got. I’m having trouble setting up the environment of my computer to access data. I’ve looked at the API getting started guide, but I can’t get through the first line without the interface saying there was an error. I’m also having trouble opening hdf5 files. I am not a programmer so I am very new to this type of work so any help would be appreciated. Thanks!
I've just started using illustris and am trying to follow the python tutorial on http://www.illustris-project.org/data/docs/scripts/ I'v done the first box creating the directories, however, when it comes to importing the package illustrious_python I get the error "No module named illustris_python" can anyone help with this?
Thanks,
Charlotte
Hi Charlotte,
I had the same problem; because there is no setup.py to install the scripts you have to manually add a path to your python path so that python can always find the illustris_python programs. I did so by adding this at the top of my python script:
where path-to-where-illustris_python-folder-is is a string giving the directory where illustris_python/ is. Hope that helps.
Karen
I am a high school student interested in accessing data for a research project through Illustris’ web API. I’ve decided to use Python as my language but that is about as far as I got. I’m having trouble setting up the environment of my computer to access data. I’ve looked at the API getting started guide, but I can’t get through the first line without the interface saying there was an error. I’m also having trouble opening hdf5 files. I am not a programmer so I am very new to this type of work so any help would be appreciated. Thanks!