对于新安装的模块,如何让`ipython`导入自动完成工作?

hug*_*omg 7 python module autocomplete ipython

我刚刚sqlalchemy在我的计算机上安装了该模块,但是当我输入import sqlTAB在ipython提示符中时,自动完成功能只会向我建议内置sqlite3模块.

如何让ipython也在sqlalchemy导入自动完成时提出建议?

unu*_*tbu 12

根据这条消息,

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

你试过%rehashx吗?

  • 退出ipython是不够的(我已经做过很多次了),但是`%rehashx`工作了! (2认同)