IPython won’t import a module that Python imports fine

Home / Uncategorized / IPython won’t import a module that Python imports fine

I have miniconda and iPython installed on a Raspberry Pi running Raspian Jesse, July 2017. I don’t think this is a Pi issue, so I didn’t post this to that particular exchange, but maybe I’m wrong.

I’m trying to load a module called RTIMU. It loads just fine in the installed python3:$ /usr/bin/python3
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> from pprint import pprint
>>> pprint(sys.path)
>>> import RTIMU

but when I try to import it from IPython, it’s not even found:$ ipython
Python 3.4.3 |Continuum Analytics, Inc.| (default, Aug 21 2015, 00:53:08)
Type ‘copyright’, ‘credits’ or ‘license’ for more information
IPython 6.1.0 — An enhanced Interactive Python. Type ‘?’ for help.

In [1]: import sys

In [2]: sys.path

In [3]: import RTIMU
ImportError Traceback (most recent call last)
in ()
—-> 1 import RTIMU

ImportError: No module named ‘RTIMU’

In [4]:
I’ve shown the sys.path for each attempt to illustrate that the fully python3 path is in the path to IPython. I’ve also shown the module repr, to illustrate that the module is in that path.

What’s going on here?


Read more

Leave a Reply

Your email address will not be published. Required fields are marked *