xeus-python
xeus-python copied to clipboard
Kernel restarts when using PyTorch
Using the XPython kernel in conjunction with PyTorch seems impossible, even when inside the same conda environment and executing simple commands like torch.device()
. I've tried many different versions of torch
and python
, but to no avail. Using the default kernel actually works without any kernel crash.
Conda environment
❯ conda list
# packages in environment at /home/user/miniconda3/envs/pytorch:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_llvm conda-forge
anyio 3.2.0 py39hf3d152e_0 conda-forge
argon2-cffi 20.1.0 py39h3811e60_2 conda-forge
async_generator 1.10 py_0 conda-forge
attrs 21.2.0 pyhd8ed1ab_0 conda-forge
babel 2.9.1 pyh44b312d_0 conda-forge
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
backports 1.0 py_2 conda-forge
backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
blas 1.0 mkl
bleach 3.3.0 pyh44b312d_0 conda-forge
brotlipy 0.7.0 py39h3811e60_1001 conda-forge
bzip2 1.0.8 h7f98852_4 conda-forge
ca-certificates 2021.5.30 ha878542_0 conda-forge
certifi 2021.5.30 py39hf3d152e_0 conda-forge
cffi 1.14.5 py39he32792d_0 conda-forge
chardet 4.0.0 py39hf3d152e_1 conda-forge
cpuonly 1.0 0 pytorch
cryptography 3.4.7 py39hbca0aa6_0 conda-forge
debugpy 1.3.0 py39he80948d_0 conda-forge
decorator 5.0.9 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
entrypoints 0.3 pyhd8ed1ab_1003 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
freetype 2.10.4 h0708190_1 conda-forge
gmp 6.2.1 h58526e2_0 conda-forge
gnutls 3.6.13 h85f3911_1 conda-forge
icu 68.1 h58526e2_0 conda-forge
idna 2.10 pyh9f0ad1d_0 conda-forge
importlib-metadata 4.5.0 py39hf3d152e_0 conda-forge
ipykernel 5.5.5 py39hef51801_0 conda-forge
ipython 7.24.1 py39hef51801_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
jedi 0.18.0 py39hf3d152e_2 conda-forge
jinja2 3.0.1 pyhd8ed1ab_0 conda-forge
jpeg 9b h024ee3a_2
json5 0.9.5 pyh9f0ad1d_0 conda-forge
jsonschema 3.2.0 pyhd8ed1ab_3 conda-forge
jupyter_client 6.1.12 pyhd8ed1ab_0 conda-forge
jupyter_core 4.7.1 py39hf3d152e_0 conda-forge
jupyter_server 1.8.0 pyhd8ed1ab_0 conda-forge
jupyterlab 3.0.16 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge
jupyterlab_server 2.6.0 pyhd8ed1ab_0 conda-forge
lame 3.100 h7f98852_1001 conda-forge
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.35.1 hea4e1c9_2 conda-forge
libffi 3.3 h58526e2_2 conda-forge
libgcc-ng 9.3.0 h2828fa1_19 conda-forge
libiconv 1.16 h516909a_0 conda-forge
libpng 1.6.37 h21135ba_2 conda-forge
libsodium 1.0.18 h36c2ea0_1 conda-forge
libstdcxx-ng 9.3.0 h6de172a_19 conda-forge
libtiff 4.2.0 h85742a9_0
libuuid 2.32.1 h7f98852_1000 conda-forge
libuv 1.41.0 h7f98852_0 conda-forge
libwebp-base 1.2.0 h7f98852_2 conda-forge
llvm-openmp 11.1.0 h4bd325d_1 conda-forge
lz4-c 1.9.3 h9c3ff4c_0 conda-forge
markupsafe 2.0.1 py39h3811e60_0 conda-forge
matplotlib-inline 0.1.2 pyhd8ed1ab_2 conda-forge
mistune 0.8.4 py39h3811e60_1003 conda-forge
mkl 2021.2.0 h726a3e6_389 conda-forge
mkl-service 2.4.0 py39h3811e60_0 conda-forge
mkl_fft 1.3.0 py39h42c9631_2
mkl_random 1.2.2 py39hde0f152_0 conda-forge
nbclassic 0.3.1 pyhd8ed1ab_1 conda-forge
nbclient 0.5.3 pyhd8ed1ab_0 conda-forge
nbconvert 6.0.7 py39hf3d152e_3 conda-forge
nbformat 5.1.3 pyhd8ed1ab_0 conda-forge
ncurses 6.2 h58526e2_4 conda-forge
nest-asyncio 1.5.1 pyhd8ed1ab_0 conda-forge
nettle 3.6 he412f7d_0 conda-forge
ninja 1.10.2 h4bd325d_0 conda-forge
nodejs 15.14.0 h92b4a50_0 conda-forge
notebook 6.4.0 pyha770c72_0 conda-forge
numpy 1.20.2 py39h2d18471_0
numpy-base 1.20.2 py39hfae3a4d_0
olefile 0.46 pyh9f0ad1d_1 conda-forge
openh264 2.1.1 h780b84a_0 conda-forge
openssl 1.1.1k h7f98852_0 conda-forge
packaging 20.9 pyh44b312d_0 conda-forge
pandoc 2.14.0.2 h7f98852_0 conda-forge
pandocfilters 1.4.2 py_1 conda-forge
parso 0.8.2 pyhd8ed1ab_0 conda-forge
pexpect 4.8.0 pyh9f0ad1d_2 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pillow 8.2.0 py39he98fc37_0
pip 21.1.2 pyhd8ed1ab_0 conda-forge
prometheus_client 0.11.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.19 pyha770c72_0 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pycparser 2.20 pyh9f0ad1d_2 conda-forge
pygments 2.9.0 pyhd8ed1ab_0 conda-forge
pyopenssl 20.0.1 pyhd8ed1ab_0 conda-forge
pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge
pyrsistent 0.17.3 py39h3811e60_2 conda-forge
pysocks 1.7.1 py39hf3d152e_3 conda-forge
python 3.9.5 h49503c6_0_cpython conda-forge
python-dateutil 2.8.1 py_0 conda-forge
python_abi 3.9 1_cp39 conda-forge
pytorch 1.9.0 py3.9_cpu_0 [cpuonly] pytorch
pytz 2021.1 pyhd8ed1ab_0 conda-forge
pyzmq 22.1.0 py39h37b5a0c_0 conda-forge
readline 8.1 h46c0cb4_0 conda-forge
requests 2.25.1 pyhd3deb0d_0 conda-forge
send2trash 1.5.0 py_0 conda-forge
setuptools 49.6.0 py39hf3d152e_3 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sniffio 1.2.0 py39hf3d152e_1 conda-forge
sqlite 3.35.5 h74cdb3f_0 conda-forge
tbb 2021.2.0 h4bd325d_0 conda-forge
terminado 0.10.1 py39hf3d152e_0 conda-forge
testpath 0.5.0 pyhd8ed1ab_0 conda-forge
tk 8.6.10 h21135ba_1 conda-forge
torchaudio 0.9.0 py39 pytorch
torchvision 0.10.0 py39_cpu [cpuonly] pytorch
tornado 6.1 py39h3811e60_1 conda-forge
traitlets 5.0.5 py_0 conda-forge
typing_extensions 3.10.0.0 pyha770c72_0 conda-forge
tzdata 2021a he74cb21_0 conda-forge
urllib3 1.26.5 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge
webencodings 0.5.1 py_1 conda-forge
websocket-client 0.57.0 py39hf3d152e_4 conda-forge
wheel 0.36.2 pyhd3deb0d_0 conda-forge
xeus 1.0.3 h7d0c39e_1 conda-forge
xeus-python 0.12.5 py39h1aaad98_1 conda-forge
xz 5.2.5 h516909a_1 conda-forge
zeromq 4.3.4 h9c3ff4c_0 conda-forge
zipp 3.4.1 pyhd8ed1ab_0 conda-forge
zlib 1.2.11 h516909a_1010 conda-forge
zstd 1.4.9 ha95c52a_0 conda-forge
Jupyter lab stdout
❯ jupyter lab
[I 2021-06-21 19:16:32.526 ServerApp] jupyterlab | extension was successfully linked.
[I 2021-06-21 19:16:32.684 ServerApp] nbclassic | extension was successfully linked.
[I 2021-06-21 19:16:32.709 ServerApp] nbclassic | extension was successfully loaded.
[I 2021-06-21 19:16:32.710 LabApp] JupyterLab extension loaded from /home/user/miniconda3/envs/pytorch/lib/python3.9/site-packages/jupyterlab
[I 2021-06-21 19:16:32.710 LabApp] JupyterLab application directory is /home/user/miniconda3/envs/pytorch/share/jupyter/lab
[I 2021-06-21 19:16:32.713 ServerApp] jupyterlab | extension was successfully loaded.
[I 2021-06-21 19:16:32.713 ServerApp] The port 8888 is already in use, trying another port.
[I 2021-06-21 19:16:32.714 ServerApp] Serving notebooks from local directory: /home/user
[I 2021-06-21 19:16:32.714 ServerApp] Jupyter Server 1.8.0 is running at:
[I 2021-06-21 19:16:32.714 ServerApp] http://localhost:8889/lab?token=6712d9522519901545d3890885d5f4ca00aafd48b56b11c7
[I 2021-06-21 19:16:32.714 ServerApp] http://127.0.0.1:8889/lab?token=6712d9522519901545d3890885d5f4ca00aafd48b56b11c7
[I 2021-06-21 19:16:32.714 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2021-06-21 19:16:32.746 ServerApp]
To access the server, open this file in a browser:
file:///home/user/.local/share/jupyter/runtime/jpserver-30043-open.html
Or copy and paste one of these URLs:
http://localhost:8889/lab?token=6712d9522519901545d3890885d5f4ca00aafd48b56b11c7
http://127.0.0.1:8889/lab?token=6712d9522519901545d3890885d5f4ca00aafd48b56b11c7
[I 2021-06-21 19:16:36.699 LabApp] Build is up to date
[I 2021-06-21 19:16:37.397 ServerApp] Kernel started: d0f17729-9807-4943-90e5-41e4067adedc
munmap_chunk(): invalid pointer
[I 2021-06-21 19:16:55.396 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), keep random ports
kernel d0f17729-9807-4943-90e5-41e4067adedc restarted
kernel d0f17729-9807-4943-90e5-41e4067adedc restarted
[I 2021-06-21 19:16:55.452 ServerApp] Starting buffering for d0f17729-9807-4943-90e5-41e4067adedc:23cf243b-4039-46f2-8e93-973923f7463c