用jupyter时旁边是python3(ipykemel),写不了了,在线快

本人一直在,越快越好,快,要哭了,本人,别用术语,听不懂,说最简单的操作

img


用jupyter时出现python3(ipykemel),写不了了

建议重启,然后注意不要关闭cmd窗口,点击Python3看能否有在线编辑!如果还是不行,检查内核

点python3能切换内核吗

你是不是关闭了cmd那个黑黑的窗口,不能关闭

这是用了百度翻译吧

尝试重启

1、看下是否有中文用户名问题,如果是的话,按照这个链接解决:

2、 重启,不要关闭cmd
3、
对于最新版本的 jupyter/ipython:使用jupyter kernelspec

完整文档:https ://ipython.readthedocs.io/en/latest/install/kernel_install.html

  • 列出当前内核

    $ jupyter kernelspec list
    Available kernels:
    python2    .../Jupyter/kernels/python2
    python3    .../Jupyter/kernels/python3
    

    就我而言,python3 内核设置被破坏了,因为链接的 py3.5 不再存在,取而代之的是 py3.6

  • 添加/删除内核
    消除:

    $ jupyter kernelspec uninstall python3
    

    添加一个新的: 使用您希望添加的 Python 并指向运行您的 jupiter 的 Python:

    $ /path/to/kernel/env/bin/python -m ipykernel install --prefix=/path/to/jupyter/env --name 'python-my-env'
    

    https://ipython.readthedocs.io/en/6.5.0/install/kernel_install.html#kernels-for-different-environments%E4%B8%AD%E6%9F%A5%E7%9C%8B%E6%9B%B4%E5%A4%9A%E7%A4%BA%E4%BE%8B

  • 再次列出:

    $ jupyter kernelspec list
    Available kernels:
    python3    /usr/local/lib/python3.6/site-packages/ipykernel/resources
    python2    /Users/stefano/Library/Jupyter/kernels/python2
    

    文档:https ://jupyter-client.readthedocs.io/en/latest/kernels.html#kernelspecs

具体步骤可以参考这个链接:

重新启动,百度全页翻译关闭了,先试一下可以不,

重启一下,cmd运行不要关闭cmd

在ananconda界面输入jt-T试一试

1,重启python不行再重启电脑;2,看看cmd窗口内报,搜一搜;3,不要关闭cmd

都不行就重新安装

你是安装了python2和python3吗?

多Python版本,记得选择安装anaconda.

根据题主所说的问题,请尝试重新启动内核,

  1. 打开的CMD黑屏终端,如下图

    img

  2. 关闭掉网页上的标签页(可省略)
  3. 如上述两步没有产生作用,请尝试在打开CMD黑屏终端(步骤1)后复制如下URL链接并且粘贴到浏览器地址栏中

    img


    地址栏位置:

    img

看看cmd窗口内报的是什么错误

1、win+r输入jupyter notebook
2、出现这个页面等待跳转到浏览器,或者复制网址到浏览打开

img

升级ipykernel看一下

pip install ipykernel --upgrade

方案一:重启,然后注意不要关闭cmd窗口,点击Python3看能否有在线编辑!
方案二:检查浏览器内核及相关的插件

内核被占用了,是不是输入的代码不能运行,就像普通的文本一样,如果是的话,可能就是路径里有中文,更改环境变量里的变量TEMP和变量TMP路径为一个无中文的路径,另外有可能是把cmd关了导致jupyter notebook被关闭,然后就没法用了Σ(っ °Д °;)っ

你这贴图是浏览器界面吗?是不是有安装了啥插件呀?停用所有插件试试呢

https://ask.csdn.net/questions/7636823?spm=1005.2026.3001.5635&utm_medium=distribute.pc_relevant_ask_down.none-task-ask-2~default~OPENSEARCH~Rate-1-7636823-ask-7708384.pc_feed_download_top3ask&depth_1-utm_source=distribute.pc_relevant_ask_down.none-task-ask-2~default~OPENSEARCH~Rate-1-7636823-ask-7708384.pc_feed_download_top3ask

Make sure you have ipykernel installed and use ipython kernel install to drop the kernelspec in the right location for python2. Then ipython3 kernel install for Python3. Now you should be able to chose between the 2 kernels regardless of whether you use jupyter notebook, ipython notebook or ipython3 notebook (the later two are deprecated).

Note that if you want to install for a specific Python executable you can use the following trick:

path/to/python -m ipykernel install

This works when using environments (venv,conda,...) and the let you name your kernel (see --help). So you can do

conda create -n py36-test python=3.6

source activate py36-test

python -m ipykernel install --name py36-test

source deactivate

And now you get a kernel named py36-test in your dropdown menus, along the other ones.