Restart kernel (Ipython Konsole in Spyder 5.1.5) with os._exit(0) does not work when using tensorflow.distribute.MirroredStrategy
See original GitHub issueProblem Description
Hello,
the problem is described in detail in https://github.com/tensorflow/tensorflow/issues/52135.
I tried it on two Systems Windows Server and Windows 10, both with similar results as described in the link.
I also tried https://docs.spyder-ide.org/current/troubleshooting/common-illnesses.html and https://stackoverflow.com/questions/47267716/spyder-an-error-ocurred-while-starting-the-kernel.
I updated all relevant packages.
I am honest, I did not try reinstalling Anaconda.
But this was not the solution.
I also tried it in jupyter qtconsole with the following errors stats:
2021-10-08 19:44:12.649086: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found
2021-10-08 19:44:12.649289: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2021-10-08 19:44:12.656806: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: RT-Z0M6A
2021-10-08 19:44:12.660749: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: RT-Z0M6A
2021-10-08 19:44:12.661284: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
[JupyterQtConsoleApp] KernelRestarter: restarting kernel (1/5), keep random ports
[JupyterQtConsoleApp] WARNING | kernel restarted
[JupyterQtConsoleApp] WARNING | kernel died: 3.0015175342559814
After this the kernel restarted without problems.
The following informations are related to the System with Windows 10:
Versions
- Spyder version: 5.1.5
- Python version: 3.9.7
- Qt version: Jupyter QtConsole 5.1.1
- PyQt version: 5.9.2
- Operating System name/version: Windows 10
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
cloudpickle >=0.5.0 : 1.6.0 (OK)
cookiecutter >=1.6.0 : 1.7.2 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.1.0 (OK)
IPython >=7.6.0 : 7.27.0 (OK)
jedi >=0.17.2;<0.19.0 : 0.18.0 (OK)
jsonschema >=3.2.0 : 3.2.0 (OK)
keyring >=17.0.0 : 22.3.0 (OK)
nbconvert >=4.0 : 5.5.0 (OK)
numpydoc >=0.6.0 : 1.1.0 (OK)
paramiko >=2.4.0 : 2.7.2 (OK)
parso >=0.7.0;<0.9.0 : 0.8.0 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.8.0 (OK)
pygments >=2.0 : 2.7.1 (OK)
pylint >=2.5.0;<2.10.0 : 2.9.6 (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.2.2;<1.3.0 : 1.2.3 (OK)
pylsp_black >=1.0.0 : None (OK)
qdarkstyle =3.0.2 : 3.0.2 (OK)
qstylizer >=0.1.10 : 0.1.10 (OK)
qtawesome >=1.0.2 : 1.0.2 (OK)
qtconsole >=5.1.0 : 5.1.1 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
rtree >=0.9.7 : 0.9.7 (OK)
setuptools >=49.6.0 : 58.2.0 (OK)
sphinx >=0.6.6 : 3.2.1 (OK)
spyder_kernels >=2.1.1;<2.2.0 : 2.1.1 (OK)
textdistance >=4.2.0 : 4.2.1 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 2.1.3 (OK)
zmq >=17 : 22.2.1 (OK)
# Optional:
cython >=0.21 : None (OK)
matplotlib >=2.0.0 : 3.4.3 (OK)
numpy >=1.7 : 1.20.3 (OK)
pandas >=1.1.1 : None (OK)
scipy >=0.17.0 : 1.7.1 (OK)
sympy >=0.7.3 : None (OK)
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (15 by maintainers)
Top Results From Across the Web
Restart kernel (Ipython Konsole in Spyder 5.1.5) with os._exit ...
Restart kernel (Ipython Konsole in Spyder 5.1.5) with os._exit(0) does not work when using tensorflow.distribute.MirroredStrategy #52135.
Read more >"Kernel died, restarting" ipython console in Spyder
(Spyder maintainer here) This is usually a problem related to your consuming all your RAM. Please try to run it in the Jupyter...
Read more >Problems exiting from Python using iPython/Spyder - iTecNote
I am having problems with Python's exit command, and I have ruled out a ... The problem comes when I run it with...
Read more >[FIXED] Spyder is restarting kernel without error message
Issue. Trying to run this example script in spyder IDE version 5.1.5 import matplotlib.pyplot as plt import numpy as np import ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, could you post an image of that to better understand what happens?
Hi dalthviz,
I mainly used conda forge as channel for installation, perhaps this helps, tomorrow I will update this post and tell you which channels and in which order I used them for installation:
.condarc: