For newly installed modules, how do I get `ipython

2019-02-13 11:08发布

问题:

I have just installed the sqlalchemy module in my computer but when I type import sql and TAB in the ipython prompt the autocomplete only suggests me the builtin sqlite3 module.

How do I get ipython to also suggest sqlalchemy on the import autocomplete?

回答1:

Based on this message,

In [1]: import sq[TAB]
Caching the list of root modules, please wait!
(This will only be done once - type '%rehashx' to reset cache!)

have you tried %rehashx ?