I apologize if it is a trivial question, but I searched and I could not find the answer. My situation is the following:
I have access to a server through ssh tunnelling. The server has Julia installed but not jupyter.
My machine has both, and my code is mostly in jupyter notebooks and I wish to keep it that way.
I wish to be able to run my code on a julia kernel on the server, but editing from a Jupyter interface/ IJulia locally.
I have found several guides on how to launch jupyter from remote, but they do not apply since the server does not have jupyter installed. Similarly, I am aware I could convert my code in a julia script and run it, but I would rather keep the convenience of a notebook for editing.
Is this even possible to do?
Any help is very appreciated!
Related
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.
I've got a notebook that has got a bit unwieldy and I'm doing some refactoring which isn't fun.
I was wondering if it would be possible to execute code in this notebook from the command line for debugging.
Ideally, I would run something like:
run-in-jupyter $notebook file.py
and see the output from the command line. There is an interpreter in jupyterlab that can do this, so this make me think that it is possible.
I have a brief search but couldn't find much
How to run an .ipynb Jupyter Notebook from terminal? I explicitly don't want to do this (I want to run commands in an existing instace)
There is this library but this seems quite involved and some of the results I found on the internet where people not being able to use the library
jupyter console (pip install jupyter-console) connects to a running jupyter kernel from the kernel. Details on running kernels can be found amongst jupyter's run time files, on my box these live in ~/.local/share/jupyter/runtime. You can find the path to the kernel data file corresponding to an open workbook with %config IPKernelApp.connection_file which will look something like ~/.local/share/jupyter/runtime/kernel-55da8a07-b67d-4584-9ec6-f24e4a26cbbd.json.
You can then connect from the command line with
jupyter console --existing ~/.local/share/jupyter/runtime/kernel-55da8a07-b67d-4584-9ec6-f24e4a26cbbd.json
You can pipe commands into it as shown
echo h=87 | jupyter console --existing 55da8a07-b67d-4584-9ec6-f24e4a26cbbd 'h=57' --simple-prompt -y
I have multiple people working on the same AWS EMR cluster to run some Spark jobs. This is being done through Jupyter Notebooks which are created/modified using the Jupyter extension installed on a SSH Target through vscode. The modules are installed on the base conda environment that is included with the /emr/notebook-env/. Some people can see the correct kernel that is associated with the base conda environment in their vscode window when working on notebooks. However, some don't see this kernel as an option. How do I make sure that everyone's vscode lists the appropriate kernel when they are creating new notebooks or modifying existing notebooks?
Another potential reason this could happen is that the Jupyter exentsion of VSCode is not installed.
To add the Jupyter extension for VSCode, search for it by clicking extensions icon in lefthand toolbar, then searching for Jupyter and installing.
The user having the issue had to update their vscode and that fixed the issue
I just installed VSCode 1.59.0 along with the Julia, Jupyter, and Python extensions. I am able to create Jupyter notebooks using either Julia or Python. When I create a notebook using Python, I see the variables I create listed in the Jupyter: Variables tab. When I create a notebook using Julia, however, I do not see the variables I create listed anywhere.
At the present moment, while Julia is generally supported in the VS Code Extension, this specific feature is not supported. I have an issue on the Microsoft side and Julia VS Code side open here: https://github.com/microsoft/vscode-jupyter/issues/7224 to hopefully kick start this process.
The Julia VS Code extension does already support this feature outside of Notebooks (when running a ".jl" file) so this should seemingly not be too difficult of a task to port it over to the Jupyter extension, but I am unfamiliar with the level of technical rigor this would require.
I'm trying to troubleshoot an issue where my Jupyter Notebook can't find an installed module, and I'm surprised that I can't find this basic information anywhere in the documentation. How do I specify where any given instance of Jupyter Notebook should look for modules?
A possibly related question: When I use jupyter --path, I see a listing of directories under the "data" heading. Is this where Jupyter looks for modules, and if so, what file do I edit to change it?
Edit I'm starting to understand, and I think I asked the wrong question. Jupyter loads a Python interpreter, and the interpreter is what deals with modules. How a Python interpreter finds modules is well-covered territory, but I still don't understand the first part. So, I should have asked, "How does Jupyter determine which Python executable to use?"