问题描述
我在 MacOS
许多人没有在MacOS中发现这些答案,就像您在评论中看到的那样.
Many people didn't find those answers useful in MacOS as you can see in the comments.
我正在尝试使用. + tab
来显示Jupyter笔记本中任何已初始化对象的所有可能方法,如下所示:
I'm trying to use . + tab
to display all the possible methods any initialized object in Jupyter notebook like this:
(用于上下文的列表对象的示例图像)
(example image of a list object for context)
,将不会显示任何内容.但是在内存中可以显示变量.
and none will show up. But in memory variables can be shown.
我正在从MacOS终端从具有以下版本的虚拟环境中启动Jupyter Notebook
I'm launching Jupyter Notebook from my MacOS terminal from a virtual environment with the following versions
jupyter==1.0.0
jupyter-client==5.3.1
jupyter-console==6.0.0
jupyter-core==4.5.0
当我使用tab
时,如何配置Jupyter Notebook以显示所有可能的方法?
How can I configure Jupyter Notebook in order to show all possible methods when I use tab
?
更新
- 升级到
notebook==6.0.1
仍然无法正常工作 - 在相同的环境中,使用
tab
时 -
%config IPCompleter.greedy=True
已设置,但仍然无法正常工作 安装的 -
pyreadline
仍然无法工作 - 它可以处理列表,但是可以使用熊猫的空白数据框.
df. + tab
不能使用Axessubplot对象显示可能的方法. - 此问题已在Linux发行版中复制,笔记本通过100%使用一个线程直到内核中忙碌,直到最终显示可能的方法为止.在MacOs中,它不会挂在内核繁忙"中,并且仅在您添加提示时才显示任何内容(例如
df.h + tab
将显示head
和hist
)
ipython
显示方法- Upgraded to
notebook==6.0.1
and still doesn't work - In the same environment,
ipython
displays methods when usingtab
%config IPCompleter.greedy=True
was set and still doesn't workpyreadline
installed still doesn't work- it worked with lists but with a pandas empty data frame
df. + tab
wont display possible methods neither with an Axessubplot object. - This issue was replicated in a linux distro and the notebook hangs in kernel busy by using one thread by 100% until it finally displays the possible methods. In MacOs it doesn't hang in 'kernel busy' and won't display anything only when you add a hint (like
df.h + tab
will showhead
andhist
)
推荐答案
我发现这里讨论了这个问题自动填充功能不起作用
I found that this issue was discussed here Autocomplete not working
您应该将ipython
版本降级为6.2.1
通过在虚拟环境中运行:
You should downgrade your ipython
version to 6.2.1
by running in your virtual environment:
pip install ipython==6.2.1
,然后重新启动jupyter笔记本.现在,它应该显示任何对象的方法,包括像这样的熊猫和海生动物
and then restart the jupyter notebook. Now it should display the methods of any object including pandas and seaborn ones like this
这篇关于如何在MacOS的jupyter Notebook中显示所有可能的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!