Python Optimal Transport (POT) crashes my kernel upon import (Apple M1)

106 views Asked by At

I'm trying to use the POT library (https://pythonot.github.io/index.html#) but for some reason when I run

import ot

it crashes my kernel. I tried first installing it using Conda via

conda install -c conda-forge pot

but for some reason python couldn't find the library when I imported so I reinstalled directly using pip. After doing this I no longer got an error claiming that the module wasn't found but now the kernel just crashes. Here's the Jupyter log -

 10:17:00.913 [info] Process Execution: ~/opt/anaconda3/envs/test/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
10:17:00.917 [info] Process Execution: ~/opt/anaconda3/envs/test/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9008 --control=9006 --hb=9005 --Session.signature_scheme="hmac-sha256" --Session.key=b"dea3b4ad-ca82-42e8-92ce-ad4bb7e9eb23" --shell=9007 --transport="tcp" --iopub=9009 --f=~/Library/Jupyter/runtime/kernel-v2-46472t4pe5mcuMXt.json
    > cwd: ~/multipers_diff/tutorial
10:17:01.175 [info] ipykernel version & path 6.25.2, ~/opt/anaconda3/envs/test/lib/python3.11/site-packages/ipykernel/__init__.py for ~/opt/anaconda3/envs/test/bin/python
10:17:01.396 [warn] StdErr from Kernel Process 0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
10:17:01.539 [info] Restarted 497130ab-e0ae-4ab8-9129-8daf4969986b
10:17:01.561 [info] Kernel acknowledged execution of cell 0 @ 1695975421559
10:17:11.170 [error] Disposing session as kernel process died ExitCode: undefined, Reason: 0.00s - Debugger warning: It seems that frozen modules are being used, which may

I thought this was a weird Jupyter issue but when I run the import statement in Python in the terminal it just hangs. I have a feeling that this has something to do with the fact that I'm using an M1 device but I'm not sure. I'd appreciate any suggestions!

0

There are 0 answers