No module named illustris_python

Christine Dantas
  • 1
  • 29 Jun '15

I have a very basic problem.

1) I have downloaded the example scripts from Bitbucket, unzipped them and made sure they are on my PYTHONPATH.

2) I am using Python 2.7.9 |Anaconda 2.2.0 (32-bit)

3) I get an error:

import illustris_python as il

Traceback (most recent call last):

File "", line 1, in ImportError: No module named illustris_python

4) I'm new to python.

Thank you in advance for any help.

Dylan Nelson
  • 1 Jul '15

Hi Christine,

If you do:

import sys
print sys.path

then really you see the path here where you have placed the illustris_python directory? (indeed you should make sure that whatever you unzipped is a directory named exactly this).

Christine Dantas
  • 2 Jul '15

Dear Dylan Nelson,

Thanks! Indeed, the file had been unzipped into a directory named "illustris-illustris_python-8205acb4e8c8". Renaming it to "illustris_python" produces no import error. But there was an even more basic error prior to this one. I did set PYTHONPATH in my .bashrc file but forget to include the export command... Thanks a lot for the tip ("import sys" etc), which clearly showed something was missing indeed. I apologize for the basic issue.

Best, Christine

  • Page 1 of 1