jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.69k stars 4.93k forks source link

Why does Jupyter notebook stop executing after a line is re-run after an error? #3084

Open yomoko opened 6 years ago

yomoko commented 6 years ago

For the Encoding categorical data section, the first time I ran it, I got an error because I didn't have sklearn installed. After I installed it and re-run, I got *In [].** No matter how many times I run it, it's not executing. Basically, after an error is made, all lines can't be executed again. image

One thing I found out is that this Jupyter Notebook is under tensorflow environment. This is what I did from the beginning:

  1. Create tensorflow environment, then install tensorflow
  2. Import the libraries, it didn't work because matplotlib not installed
  3. Then install matplotlib

From my own troubleshooting, this is where the problem begins. So I tried to uninstall matplotlib, it's fine again as shown.image Now even there's an error, I can still re-run it and the execution is fine because the number will be updated instead of [*].

Then the problem arises again because if I keep running it, it will turn into [*] again after maybe 3rd or 4th times. The thing is if I do the same thing with Jupyter notebook under root environment(no tensorflow installed, matplotlib is installed), I can keep re-running it for as many times and there's no problem(the number will be changed). So what's wrong with it?

yomoko commented 6 years ago

It seems the problem came from tensorflow python 3.6. I tried many different methods to troubleshoot. Lastly I removed tensorflow environment, and reinstalled as python 3.5, Jupyter notebook is working fine now. It won't stop executing. Does 3.6 have to be fixed?

takluyver commented 6 years ago

AFAIK Jupyter works fine with Python 3.6. There may be some problem with Tensorflow.

caisq commented 6 years ago

@yomoko What version of TensorFlow 3.6 are you using? If you downloaded it from a URL, what is the URL?

yomoko commented 6 years ago

@caisq The lastest version. I used this pip install --ignore-installed --upgrade tensorflow to download. I downgraded my python to 3.5 already, and I am using tensor flow 3.5 now. Since 3.6 is not working properly.