I want to use the Wolfram Language with Jupyter notebooks, and VSCode is the application of my choice. I did all the procedure to generated a WolframLanguage kernel for Jupyter.
If I launch the Jupyter notebook from terminal by running jupyter notebook in my terminal, a Jupyter notebook opens in my browser and it shows the Wolfram kernel. These are the kernels returned by terminal.
They show up in the browser-version of Jupyter too.
Now I go to VS Code. I start a new Jupyter notebook by using the following command by using shift+command+P.
Create: New Jupyter Notebook
Now the kernel picker prompts me to choose kernels. Not only does it not have the WolframLanguage kernel, but it also shows completely different kernels from what were returned by the terminal.
Please guide me on how do I make my WolframLanguage kernel appear in my VS Code.
Thanks!!!
Related
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.
I have added a new kernel to my jupyter notebook. It works totally fine using Jupyter in the browser. However if I try to open my notebook in VSCode (and change the kernel) it doesn't show up --> the drop-down menu doesn't show my kernel.
Is there anything I can do to resolve this issue.
Thanks in advance!
I am using Visual Studio Code, Jupyter and Anaconda 3.8.5. I have a notebook, in that notebook I cannot select the kernel I want. The kernel is visible, I can click on it, a pop-up below appears stating kernel is switching, but it is not selected.
What I have tried:
Check ipykernel is installed.
Reinstalled Jupyter in that environment.
Tried restarting Visual Studio Code.
Restarted machine.
Tried to see if I could set the kernel using a Visual Studio Code workspace setting (nope).
Ideas appreciated.
I am trying to run matlab code from Jupyter notebooks.
I am following the link below for guidance:
https://www.youtube.com/watch?v=WufMGW5Bv4g
Now I have installed matlab_kernel. And I see that it is installed on the machine when i run a pip list.
When I open Jupyter notebook, and click on the New notebook dropdown, I do not see the MATLAB option.
Also, at point 3:22, the instructor installs python from Program Files/Matlab.
However, I do not see the MATLAB folder in my Program Files.
What am I missing here. Any guidnce would be very helpful.
Is there a way to open an IPython interactive console in pycharm that is connected to an existing running kernel (similar to "python --existing")?
btw: in case it's relevant, in my case, the running kernel is of a Jupiter notebook...
EDIT: To clarify, my question is NOT about how to open an interactive console in PyCharm. It is about how to connect that interactive console to a an existing running (Jupiter notebook) Kernel.
(tl;dr: Use jupyter console --existing in the PyCharm "Terminal" tool window (not the "Python Console" tool window) to connect to an existing iPython kernel running in a local Jupyter Notebook server.)
I can confirm that the comment by #john-moutafis suggesting ipython console --existing is the right idea. The command gives "WARNING | You likely want to use jupyter console in the future" so I tried that.
I have a project using a conda environment as its interpreter. Jupyter Notebook is installed in the conda environment.
I open the Terminal tool window. It automatically activates the conda environment.
I type jupyter notebook. The notebook server starts and a browser window opens.
I create a notebook in the browser, and execute a cell containing foo = "bar".
In PyCharm, I open another Terminal tool window by clicking the plus sign to the left of the terminal pane.
In the new terminal I type jupyter console --existing, and it starts an ipython console session.
At the prompt I type dir(), and foo is among the results, confirming that I'm attached to the same kernel as the notebook.
I don't know how it picks which kernel to connect to when there are multiple kernels running in the notebook server.
Don't type exit in the iPython session if you plan to continue using the notebook, it shuts down the kernel.
Unfortunately, tools like Debug and "Execute Line/Selection in Console", which are available for the "Python Console" tool window, are not available for the "Terminal" tool window. In fact, because the Terminal tool window is a simple tool, and that's where I've run my commands, this solution isn't very integrated with PyCharm. The terminal opens in the project directory and activates the conda environment, and it's conveniently adjacent to the editors and tools of the IDE, but otherwise there's no connection to PyCharm's tools.
If anyone can successfully attach PyCharm's integrated PyDev debugger to a running kernel, please chime in.
I'm using PyCharm 2016.3 on macOS 10.12.3.
The easiest way for me is just to type %qtconsole in a jupyter notebook cell and run it. A qt console will open already connected to the running kennel. No PyCharm involved.