简体   繁体   English

无法使用具有正确Python版本的Jupyter Notebook,并且Jupyter内核自动崩溃

[英]Unable to use Jupyter Notebook with the right Python version, and Jupyter kernel crashes automatically

I am frustrated with this now. 我现在对此感到沮丧。

I have been using Jupyter for a long time, everything went well. 我使用Jupyter已有很长时间了,一切进展顺利。 But recently I did some changes (I don't even remember, But I am sure I was forced to do that due to some occations, I am the worst, I know), and now the when I use Jupyter, the kernel shows "Python 3": 但是最近我做了一些更改(我什至不记得,但是我确定由于某些原因我被迫这样做,我是最糟糕的,我知道),现在当我使用Jupyter时,内核显示“ Python 3“: 在此处输入图片说明

But Jupyter actually uses python2.7 (because of the crash I can't even provide a screenshot). 但是Jupyter实际上使用python2.7(由于崩溃,我什至无法提供屏幕截图)。 Even worse, every time I open the notebook, it automatically crashes after 10 seconds. 更糟糕的是,每次打开笔记本时,它都会在10秒后自动崩溃。 在此处输入图片说明 在此处输入图片说明

I wanted to remove it and reinstall it, I am not sure which pip did I use to install it, but whenever I execute both pip2.7 uninstall jupyter or pip3.5 uninstall jupyter , I get the same result: " Cannot uninstall requirement jupyter, not installed ", so I can't even uninstall it. 我想删除它并重新安装它,我不确定我使用哪个pip来安装它,但是无论何时我同时执行pip2.7 uninstall jupyterpip3.5 uninstall jupyter ,我都会得到相同的结果:“ 无法卸载需求jupyter ,而不是 “”,因此我什至无法卸载它。

And I am not using anaconda as well, I used to but later I found out jupyter couldn't import the packages install by anaconda at all so I uninstalled anaconda, so the jupyter I am using must be installed with pip . 而且我以前也不使用anaconda,但是后来我发现jupyter根本无法导入anaconda安装的软件包,因此我卸载了anaconda,因此我要使用的jupyter必须与pip一起安装。

Is there anyone who can help? 有谁可以帮忙吗? I googled for a whole day trying to find solutions but couldn't. 我用了整整一天的时间在Google上搜索,但找不到。 I am frustrated right now and really need to get back to my work. 我现在很沮丧,真的需要恢复工作。

Much appreciated. 非常感激。

thanks. 谢谢。

You could ignore whatever Python version are installed, redownload Miniconda , then configure PATH , and rely on it exclusively for most Python related things. 您可能会忽略安装的任何Python版本,重新下载Miniconda ,然后配置PATH ,并在大多数与Python相关的事情上完全依赖它。 Inside a anaconda/miniconda virtual environment, you could still use pip. 在anaconda / miniconda虚拟环境中,您仍然可以使用pip。 You may try 你可以试试

conda create -p venv -y python=2 scipy 

source activate venv/

jupyter notebook

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM