VSCode Jupyter Extension: Can't find new kernel after updating Julia? - visual-studio-code

I'm using the new Jupyter extension for VSCode insiders, and it worked great until I updated Julia (from 1.5.1 to 1.5.3). VScode will run plain .jl files without issue and correctly locates Julia 1.5.3, but the "Jupyter" extension hasn't located the new kernel and tries to use 1.5.1 (now deleted), so I can't run any .ipynb files.
How do I teach Jupyter where the new kernel is?
EDIT: My workaround has been to make a copy of the folder containing "Julia 1.5.3" and rename it "Julia 1.5.1" to make the old path work. This works, but I'd obviously prefer to update the path to the kernel.

When you switch kernels, you need to make sure you have "IJulia.jl" installed in the new Julia environment. See here for more details: https://github.com/JuliaLang/IJulia.jl#quick-start

Related

Julia packages not found in vs code

I'm very new to vscode and have been using previously jupyter notebooks. The problem is that when I try to run julia in vs code, it doesn't find any of the packages that have been installed with jupyter. Do I have to reinstall everything or is there some way to fix this?
The julia code works, but not the packages.

Missing Jupyter Notebook Kernels in VSCode

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

How I should open .ipynb as new notebook version in vs code

I reinstalled my vs code, then, when I open the .ipynb in vscode, I also reinstalled the jupyter plugin. But I found the old notebook version opened.
Before I reinstalled these programs, they were still new versions.
I suggest using Anaconda Navigator to download & use a virtual environment that could be easier to use in most cases.To use the virtual environment use -
Ctrl+Shift+P or Python: Select Interpreter command from the Command Palette.However,please make sure to add environment variables to your VS-Code.
Otherwise,best bet may be to use the Jupyter notebook from Anaconda Navigator which pretty much does the same thing

How to install VS code extension manually?

I am not able to download any extension via VS Code on my office system due to the proxy. Is there a way that I can do it manually by downloading and placing the downloaded files at the right place?
Download the extension from VSCode marketplace, it'll be a .vsix file, then do like the image below.
You can also use the command-line to install extensions from VSIX files using the --install-extension parameter.
code --install-extension /path/to/vsix
eg: code --install-extension vscodevim.vim
Just in case u have a same UI as mine. Happy coding!
You can also just drop the extension files into the correct folder. On mac, for example, this is ~/.vscode/extensions/. I'm unsure whether it works for all extensions, but it works just fine for a simple language specification.
Two notes when downloading an extension from VScode marketplace:
Version compatibility
Extensions are updated repeatedly on the marketplace. If you download and transfer it to the target computer, it may not work. One can try to look into version history of the extension and download the older version. But it is not easy to correlate the extension version with VSCode version. You can check the version of the extension on the online computer and try to find a match in the marketplace. But sometimes the older versions are not listed there.
Dependencies
An extension may have dependencies. When installing from within VSCode, VScode installs the dependencies for you. Good example is the Python extension that requires few other extension like Jupyter and pylance.
To handle these two cases easier:
1- Install the same VSCode version on the online (access to internet) computer as the offline (no access to internet) target computer.
2- From within the VSCode, install the desired extension. It will install the right version and all the dependencies.
3- Find the folder where extensions are installed. On windows, it is in: C:\Users\USER_NAME\.vscode\extensions. On Linux, it is ib ~/.vscode/extensions.
4- Copy and transfer the extensions to the target offline computer, in the extensions folder.
5- Restart the VSCode to see the extensions.
The below screenshot shows all the extensions that I transferred to have the python extension available on the target computer:

How to open Visual Studio Code from the command line on linux?

I know I can use command "code" to open VS code or file, but I don't know what should I do to make it possible after I install VS code in Ubuntu.Thanks.
Launching from the Command Line
You can launch VS Code from the command line to quickly open a file, folder, or project. Typically, you open VS Code within the context of a folder. We find the best way to do this is to simply type:
code .
Tip: We have instructions for Mac users in our Setup topic that enable you to start VS Code from within a terminal. We add the VS Code executable to the PATH environment variable on Windows and Linux automatically during installation.
Sometimes you will want to open or create a file. If the specified files does not exist, VS Code will create them for you:
code index.html style.css readme.md
Tip: You can have as many file names as you want separated by spaces.
Source: https://code.visualstudio.com/Docs/editor/codebasics
So, there are a couple of solutions for this.
I've linked a video that shows you how to add vscode to $PATH
(which didn't work for me because I couldn't find the "shell:install path" command)
I uninstalled the vscode from my ubuntu and re-installed using sudo snap install --classic code
(This method worked for me)
Tell me which one works for you... and if you have extensions installed to your vscode then i guess you ought to make a backup or something.
Link to the video: https://youtu.be/iP5FKZXtDBs