ipython

How to replace “from IPython.kernel import KernelManager”?

此生再无相见时 提交于 2021-02-19 06:35:26
问题 I have some code which tries to import a KernalManager from IPython , but I get a Warning /home/alex/Projects/VETests/ipyrunner/local/lib/python2.7/site-packages/IPython/kernel/__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead. "You should import from ipykernel or jupyter_client instead.", ShimWarning) but when I do the following from ipykernel import KernelManager I get an error

Why is Jupyter Notebook creating duplicate plots when making updating plots

自作多情 提交于 2021-02-18 22:43:31
问题 I'm trying to make plots in a Jupyter Notebook that update every second or so. Right now, I just have a simple code which is working: %matplotlib inline import time import pylab as plt import numpy as np from IPython import display for i in range(10): plt.close() a = np.random.randint(100,size=100) b = np.random.randint(100,size=100) fig, ax = plt.subplots(2,1) ax[0].plot(a) ax[0].set_title('A') ax[1].plot(b) ax[1].set_title('B') display.clear_output(wait=True) display.display(plt.gcf()) time

Why don't I need “%matplotlib inline” in my jupyter notebook?

﹥>﹥吖頭↗ 提交于 2021-02-18 14:00:53
问题 I am just trying to understand why my jupyter installation does not require me to run '%matplotlib inline' (which, according to everything I've read, I should have to run that to get my plots inline in my jupyter notebook). But the fact is, my matplotlib plots appear inline in my notebook whether I run '%matplotlib inline' or not. I am running an anaconda install of jupyter on ubuntu under WSL, using chrome as the client to my notebook server. jupyter --version 4.4.0 and jupyter-notebook -

IPython 5.0 and key bindings in console

醉酒当歌 提交于 2021-02-18 08:57:53
问题 The new release of IPython does not depend any more on readline but uses the pure Python library prompt-toolkit , solving maintenance problems on Apple's and Windows' systems. A new feature is the ability to edit a multi-line code block, using the cursor keys to move freely in the code block — with this power it comes, at least for me, a problem: because a ret inserts a new line in your code, to pass the whole block to the interpreter you have to use the shortcut alt + ret or possibly the

Completion in IPython (jupyter) does now work (unexpected keyword argument 'column')

北城以北 提交于 2021-02-14 11:23:10
问题 I'm using jupyter notebook, and it works fine, but when I press TAB, the auto-completion doesn't work. I already checked all the similar cases in StackOverflow, but none of the solutions worked for me. I have also tried to do "pip upgrade" to: IPython, IPYKernel, Jedi, and Tornado, the upgrade works fine but the problem is still there. I tried in Firefox, Chrome and Edge. When I press TAB I can see those errors in the terminal: [IPKernelApp] ERROR | Exception in message handler: Traceback

Completion in IPython (jupyter) does now work (unexpected keyword argument 'column')

♀尐吖头ヾ 提交于 2021-02-14 11:23:02
问题 I'm using jupyter notebook, and it works fine, but when I press TAB, the auto-completion doesn't work. I already checked all the similar cases in StackOverflow, but none of the solutions worked for me. I have also tried to do "pip upgrade" to: IPython, IPYKernel, Jedi, and Tornado, the upgrade works fine but the problem is still there. I tried in Firefox, Chrome and Edge. When I press TAB I can see those errors in the terminal: [IPKernelApp] ERROR | Exception in message handler: Traceback

Completion in IPython (jupyter) does now work (unexpected keyword argument 'column')

你。 提交于 2021-02-14 11:20:57
问题 I'm using jupyter notebook, and it works fine, but when I press TAB, the auto-completion doesn't work. I already checked all the similar cases in StackOverflow, but none of the solutions worked for me. I have also tried to do "pip upgrade" to: IPython, IPYKernel, Jedi, and Tornado, the upgrade works fine but the problem is still there. I tried in Firefox, Chrome and Edge. When I press TAB I can see those errors in the terminal: [IPKernelApp] ERROR | Exception in message handler: Traceback

Completion in IPython (jupyter) does now work (unexpected keyword argument 'column')

删除回忆录丶 提交于 2021-02-14 11:20:54
问题 I'm using jupyter notebook, and it works fine, but when I press TAB, the auto-completion doesn't work. I already checked all the similar cases in StackOverflow, but none of the solutions worked for me. I have also tried to do "pip upgrade" to: IPython, IPYKernel, Jedi, and Tornado, the upgrade works fine but the problem is still there. I tried in Firefox, Chrome and Edge. When I press TAB I can see those errors in the terminal: [IPKernelApp] ERROR | Exception in message handler: Traceback

Jupyter Notebook小技巧

雨燕双飞 提交于 2021-02-12 05:41:09
多行输出 在Notebook的中开头cell中添加以下代码可以实现多行输出: from IPython .core .interactiveshell import InteractiveShell InteractiveShell .ast_node_interactivity = 'all' #默认为'last' 例如: 如果需要一劳永逸的在每个文件中自动实现这个功能,可以在macOS的/Users/your_user_name/.ipython/profile_default/或者windows的C:\Users\your_profile.ipython\profile_default文件夹下创建ipython_config.py文件。(mac下你可以在终端进入这个目录touch ipython_config.py来创建)。 然后打开ipython_config.py文件,添加以下两行: c = get_config ( ) c . InteractiveShell .ast_node_interactivity = "all" 保存,重启Notebook后生效。 更多设置点这里看官方说明 感谢 离宫2 提示这个技巧。 module 'numpy' has no attribute ' version ' import pandas as pd 就报这个错误,原因未知

Does running a jupyter notebook trigger any web traffic?

与世无争的帅哥 提交于 2021-02-10 16:42:45
问题 I'm a bit embarrased to even ask this, but I need to be 100% sure: Does basic usage of a jupyter notebook (running on localhost:8888) trigger any web traffic? I've found it surprisingly hard to find good info on this in the docs or elsewhere. 回答1: If you are just running localhost:8888, and accessing it from your own computer, then no you are not actually generating web traffic, since you can access it even when you have no internet connection. There will still be traffic when you interact