When I try to import the module illustris_python
I get the error
ImportError: No module named 'util'
The module util
is in the directory below the module snapshot.py
that needs it, so I am confused as to why Python sees one module, but not the other.
I have included the import call as well as traceback below.
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 3.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
%guiref -> A brief reference about the graphical user interface.
In [1]: import illustris_python as il
Traceback (most recent call last):
File "<ipython-input-1-ff06d24b4811>", line 1, in <module>
import illustris_python as il
File "C:\WinPython-64bit-3.4.3.2\python-3.4.3.amd64\lib\site-packages\illustris_python\__init__.py", line 3, in <module>
from . import *
File "C:\WinPython-64bit-3.4.3.2\python-3.4.3.amd64\lib\site-packages\illustris_python\snapshot.py", line 6, in <module>
from util import partTypeNum
ImportError: No module named 'util'
In [2]:
Screenshot showing location of util
:
site-packages
really shouldn't be on hisPYTHONPATH
. It'll end up onsys.path
anyway. – Hyamsillustris_python
into? If so, it can easily get confused about the local copies vs. the installed copies. – Hyamsillustris_python
support Python 3? – Hyamsillustris_python
is a repo of sample files on BitBucket that doesn't include asetup.py
or any manual installation instructions. If you had to guess how to install it because they didn't tell you, I'd be surprising if you guessed everything 100% right; I'm sure I wouldn't get it right without some debugging. :) – Hyams