Troubleshooting: Kernel always dies using IJulia in IPython notebook - ipython

I recently began using julia, and I would like to use in with IPython Notebook/Jupyter.
So, I installed julia using MacPorts, i.e. sudo port install julia. Following the installation instructions here: https://github.com/JuliaLang/IJulia.jl
After the prompt, I used "Pkg.add("IJulia") to install IJulia.
However, I cannot use Julia with IPython notebook. After opening the notebook with
ipython notebook --profile=julia
the kernel for the julia notebook dies instantly and cannot be restarted.
The error on the Terminal shows:
[I 19:03:19.410 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel dc00ae3a-8fa6-4d01-a802-f7845a16a9ba restarted
ERROR: SHA256 not defined
in include at /opt/local/lib/julia/sys.dylib
in process_options at /opt/local/lib/julia/sys.dylib
in _start at /opt/local/lib/julia/sys.dylib
while loading /Users/NAME/.julia/v0.3/IJulia/src/kernel.jl, in expression starting on line 6
I suspect I have installed IJulia incorrectly? How can I solve this?
(The version of julia is julia version 0.3.11. The version of python is Python 2.7.10. The version of ipython is 4.0.0.)

The current stable version of Julia is v0.4.0.
You should download it directly from the Julia homepage (.dmg):
http://julialang.org/downloads/
Having done that, run it and do Pkg.add("IJulia") again.
Then from within Julia do
using IJulia
notebook()
Note that the Jupyter Notebook (the new name for what used to be the IPython Notebook) is run as
jupyter notebook
The --profile julia is no longer necessary and should be removed.
Furthermore, this (jupyter notebook) will only work if you had a previous installation of Jupyter, which seems to be the case. In this case, I suggest you upgrade it with conda, if you installed Anaconda, or with pip.)

Related

Jupyter Notebook Error: "Jupyter command `jupyter-notebook` not found."

I just downloaded vscode using homebrew and install python#3.11 using homebrew as well. I used pip3 install jupyter as I saw other recommend to fix this issue and still no luck. I have downloaded all the extensions on vscode and I have set the kernal to homebrew version of python and I still recieve this issue. Note that I have used notebooks in the past and have never gotten this issue so I am not really sure what it is this time. I have not installed anaconda.
I have tried uninstalling and installing the extensions but no luck. I have tried to pip3 uninstall jupyter, pip3 uninstall notebook and reinstall them and still no luck. I have tried to change the kernal to the default python3 on the mac and still nothing. My mac is m1 running on Ventura 13.2. I am able to run python code on regular python files just not using jupyter notebook. I followed the instructions how to set it up on vscode website but I got this error. Any help would be appreciated thank you.
I have same issue using VSCode on Mac OS.
VSCode's 'Jupyter' plugin is broken, causing VSCode unable to bind with python interpreter. Downgrading from v2023.1.2000312134 to v2022.11.1003412109 fixed my issue.
I had the same issue, running on m1 mac (Ventura 13.2). If you aren't already, make sure you are utilising a python virtual environment:
# Create a python virtual environment
$ python -m venv venv
# Activate your python virtual environment
$ source venv/bin/activate
Form your VSCode Command Palette (Shift+Command+P), search and then choose
Jupyter: Select Interpreter to Start Jupyter Server
You should then select the python version that is associated to your virtual environment (venv).

Why has Jupyter notebook kernel stopped working after RStudio package installation

To date I have been using Jupyter Notebook to run R and sometimes Python code. I have also been using RStudio at times. Recently, while using RStudio, I was prompted to install some package (cannot exactly remember). At any rate, I installed this package. Dont know if only coincidence, but trying to run R in the notebook resulted in kernel not connecting. I found the same issue with Python, the Python kernel is also not connecting anymore.
Executing the below, I get;
(base) C:\WINDOWS\system32>jupyter kernelspec list
Available kernels:
ir C:\Users\Admin\AppData\Roaming\jupyter\kernels\ir
python3 C:\Users\Admin\anaconda3\share\jupyter\kernels\python3
How do I get Jupyter Notebook's kernels to work again.
Executing IRkernel::installspec() in R via Anaconda CMD prompt have resolved the issue. Note for others with this issue, you may be prompted to run install.packages(“rlang”) before.

Can't find kernel for vscode jupyter

I am trying to install wolfram kernel for jupyter notebook (vscode) because vscode extension: wolfram language notebook doesn't work.But when I finished installation something werid happended.
I can find wolfram kernel in command line : jupyter kernelspec list, but not in my vscode
Hope someone can tell me how vscode jupyter works?
So I hope my solution (on Linux) will work for you too:
get the repository:
https://github.com/WolframResearch/WolframLanguageForJupyter
add the kernel by executing: wolframscript configure-jupyter.wls add
check if the kernel is added: jupyter kernelspec list
in vscode search for "select Interpreter to start jupyter server" and select your python version
Now the kernels should be updated and you should be able to choose your installed wolfram kernel.
In case its not working I installed the package
python"version"-wolframalpha
. However I do not know if that is necessary.

Add python 2.7 to ipython notebook (default python3)

I am having a really hard time adding python 2.7 as a kernel to my iphyton notebook. I have anaconda installed with a python environment called "python2." I can navigate to the environment folder and launch ipython (using python 2.7) in the script folder.
I have tried ipython kernelspec install-self using iphython.exe, however, it seems like ipython is not even a command in that window.
I tried it again in anaconda command window and it just install python3. Please help with precise steps.
Ok I got it. I had to:
Change my python.exe under envs to python2.exe. I also change pythonw to pythonw2.
Added Anacoda\envs\python2 folder that includes python2.exe and scripts to path variable
Then ran this command in Anaconda command window: python2 -m IPython kernelspec install-self
Then ipython kernelspec list to verify

Can IHaskell and IPython coexist?

I have IPython and IPython Notbook installed and am working my way through the IHaskell installation instructions. I have all the IHaskell prerequisites installed, but before I commit to the final step of installing IHaskell itself with
cabal install ihaskell --reorder-goals
I want to confirm one — perhaps obvious — thing: Will I still be able to use Python Notebooks? The instructions following the step above seem to say that simply entering
ipython notebook
will run Haskell rather than Python, as if Haskell has replaced Python in IPython Notebooks. Is this the case? How do I specify whether I want to run Haskell or Python in a notebook, or in IPython itself for that matter? Can I switch freely between the two?
OS X 10.10.4; Xcode 6.4; CLT: 6.4.0.0.1; Clang: 6.1; Haskell Platform 7.10.2-a. Python 2.7.10 (Homebrew). Using Homebrew in general, but, following what appears to be Homebrew's recommendation, not for Haskell.
Like other kernels, IHaskell can be added to IPython/Jupyter without interfering with other kernels. Once added Notebooks will recognize the language used in (suitably tagged) notebooks and will add an entry to the 'New' notebook menu that allows selection of the language to be used for new notebooks.
Each kernel will have its own command for adding itself to IPython/Jupyter. For IHaskell this is simply
ihaskell install