skimage module not found by iPython's completion?
Michael Aye
kmichael.aye at gmail.com
Mon Feb 6 14:32:32 EST 2012
Thanks, works fine!
Michael
On Feb 6, 8:12 pm, Tony Yu <tsy... at gmail.com> wrote:
> On Mon, Feb 6, 2012 at 12:43 PM, Michael Aye <kmichael.... at gmail.com> wrote:
> > Hi all,
>
> > I noticed some weirds things with iPython's completion regarding
> > skimage v0.12.
> > When typing 'import sk' and then pressing <tab> to complete the import
> > line, iPython cannot find skimage.
> > But if I type 'import skimage' on my own, it works.
> > Then, I type 'skimage.' and press <tab> to inspect the module, and I
> > get:
>
> > skimage.data_dir skimage.img_as_int skimage.pkg_dir
> > skimage.util
> > skimage.get_log skimage.img_as_ubyte skimage.test
> > skimage.version
> > skimage.img_as_float skimage.img_as_uint skimage.test_verbose
>
> > (= half missing).
>
> > Anybody knows what's going on here? I'm puzzled...
>
> > Best regards,
> > Michael
>
> Huh, I guess I didn't notice this first issue until you mentioned it. Turns
> out<http://stackoverflow.com/questions/1552961/ipython-tab-completes-only...>there's
> an easy fix: Run `%rehashx` in ipython to rebuild the database of
> known modules.
>
> As for the second issue: We don't automatically import any subpackages
> (other than `util`). This was a design decision since automatic imports of
> all subpackages would increase load times (there may be other reasons too).
> On the other hand, if you just want to see which submodules are available
> for import, you can write `import skimage.<tab>` (note the dot before
> <tab>) or `from skimage import<tab>` in ipython.
>
> Hope that helps,
> -Tony
More information about the scikit-image
mailing list