popgenmethods / momi2

Infer demographic history with the Moran model
GNU General Public License v3.0
47 stars 11 forks source link

Jupyter notebook kernel dies #30

Closed mgsantos66 closed 2 years ago

mgsantos66 commented 4 years ago

I am still struggling with getting Jupyter notebook to run in my computer (Mac OSX). I have tried to delete everything and install everything again, but I keep running into the same issue.

After I install Anaconda I use this to setup a new environment and install momi: $ conda create -n momi_py36 python=3.6 -y $ conda activate momi_py36 $ conda install momi ipyparallel openblas jupyter -c defaults -c conda-forge -c bioconda -c jackkamm -y

Then I cd to my folder and run Jupyter notebook: $ jupyter notebook --debug

The notebook works well with bash commands and to create the log file, but the kernel dies when I try to import momi or even matplotlib I get the message: The kernel appears to have died. It will restart automatically.

This is the output in the Terminal when I run the import momi command:

[D 12:13:45.152 NotebookApp] 304 GET /static/base/images/favicon-busy-1.ico (::1) 2.51ms [I 12:13:53.518 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports WARNING:root:kernel 6bbba8b4-6524-4eff-923c-2e8102463828 restarted [D 12:13:53.520 NotebookApp] Starting kernel: ['/opt/anaconda3/envs/momi_py36/bin/python', '-m', 'ipykernel_launcher', '-f', '/Users/Marcella/Library/Jupyter/runtime/kernel-6bbba8b4-6524-4eff-923c-2e8102463828.json'] [D 12:13:53.630 NotebookApp] Connecting to: tcp://127.0.0.1:52363 [D 12:13:56.632 NotebookApp] KernelRestarter: restart apparently succeeded [D 12:13:56.889 NotebookApp] activity on 6bbba8b4-6524-4eff-923c-2e8102463828: status (starting) [D 12:13:56.891 NotebookApp] activity on 6bbba8b4-6524-4eff-923c-2e8102463828: status (busy) [D 12:13:56.899 NotebookApp] activity on 6bbba8b4-6524-4eff-923c-2e8102463828: execute_input [I 12:13:59.634 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports WARNING:root:kernel 6bbba8b4-6524-4eff-923c-2e8102463828 restarted [D 12:13:59.636 NotebookApp] Starting kernel: ['/opt/anaconda3/envs/momi_py36/bin/python', '-m', 'ipykernel_launcher', '-f', '/Users/Marcella/Library/Jupyter/runtime/kernel-6bbba8b4-6524-4eff-923c-2e8102463828.json'] [D 12:13:59.677 NotebookApp] Connecting to: tcp://127.0.0.1:52363 [D 12:14:01.445 NotebookApp] activity on 6bbba8b4-6524-4eff-923c-2e8102463828: status (starting) [D 12:14:01.511 NotebookApp] activity on 6bbba8b4-6524-4eff-923c-2e8102463828: status (busy) [D 12:14:01.525 NotebookApp] activity on 6bbba8b4-6524-4eff-923c-2e8102463828: status (idle) [D 12:14:02.682 NotebookApp] KernelRestarter: restart apparently succeeded

I tried running jupyter notebook using my base environment, and I can import matplotlib with no issues, which makes me think I have a path problem or a version incompatibility issue.

Any help would be appreciated!

jackkamm commented 4 years ago

Please try removing "-c defaults" from the "conda install" line.

Also, I've just uploaded a new version of momi, please try using a fresh conda environment with momi=2.1.18 and python=3.7.