Why do my internal hyperlinks not work in my notebook when creating them remotely? - visual-studio-code

I have quite a large jupyter notebook I'm working on in VScode, while using the high performance computing facility (connected through SSH).
I am trying to create some internal hyperlinks so I can jump from my table of contents to a specific section in the notebook. However, this does not work.
Code I'm using to create the link:
[Summary](#Summary)
some other cells
## Summary
It does create a link, but clicking on it does not work in VScode. This one keeps me right at the top of the notebook, other links to sections further down bring me to seemingly random cells down my file. Also, when opening the notebook in Github, clicking the link brings me back to the folder where my notebook is located.
The same construction does work both in a local jupyter instance, and in vscode, when not connected to the HPC.
One difference I can think of is that I use miniconda on the HPC, and the full anaconda installation locally.
Are the links not supported in miniconda? Or is it something else?

Related

Clear or hide old remote kernel connections and use local (or selected interpreter) kernel by default

Using Windows 10, remote server is Linux
I had set up VSCode to be able to use kernels from a JupyterHub server (there are two in the image, "Python 3" and "venv"), but have since found I prefer using the Remote-SSH extension to develop directly on the server. I want to get rid of this long list of kernels available when editing a notebook or interactive .py file in VSCode:
It's additionally annoying because the selected kernel defaults to the first kernel in the list, which doesn't have all the dependencies I need, so I always see an import error. This environment is managed by my IT so I can't just alter it or install what I need there.
I would love to just get rid of the remote kernels entirely and just use local kernels (shown by clicking the Connect to Local Kernels option in the image), or at least show the local kernels by default. Ideally, the selected Python interpreter would always be automatically selected as the kernel.
Things I've tried:
Deleting the remote URI > Jupyter: Specify Jupyter Server for Connections. VSCode let me delete all but one URI.
> Jupyter Filter Kernels doesn't save my selections half the time, and it never changes jupyter.kernels.filter in settings.json, so this has never had an effect on the kernels that are listed.
Reinstalling the Jupyter extension
Reinstalling the Jupyter extension and deleting it's C:\myuser\.vscode\extensions folder
Searching for other places this connection data might be stored but found nothing

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 to replicate the following Spyder behavior in VSCode?

I'm new to coding Python in VSCode. Previously I used Spyder but decided to move to VSCode as the project management seems better in it (I could easily switch to other files/folders by clicking on the path, just like in PyCharm). But I really need this one workflow which I still have not managed to do it in VSCode.
write some codes like Selenium.
Click run (F5)
The selenium browser opens up.
I could use the Ipython terminal to access the code interactively (find the element in the browser etc) and send new command.
I would like to have this workflow in VSCode. Im also quite overwhelmed by the difference in these 2 IDEs, for example, in VSCode, you have integrated terminal, a debugging console and an output tab, while im used to have only one-for-all Ipython tab.
Ok, I figured out what I need. Basically I just need to right click on the python file that I want to run on the side bar. Then I have to select 'run current file in interactive window'. The only difference is on the Ipython console, I have to use shift+Enter to send my input instead of just clicking enter. But its not a big deal.

How can i disable Jupyter as VS Code's default Python executor?

Jupyter kernel is slow to load and I don't need code cells in VS Code (they're poorly formatted anyways, and just awkward). Is there any way to disable Jupyter kernel as the executor and just go back to using ipython in the attached VS Code terminal?
This is what you need:
"python.dataScience.sendSelectionToInteractiveWindow": false
You can make it directly on settings.json file or through settings tab: Python > Data Science: Send Selection To Interactive Window.
You can make it at user or at workspace level.

Unable to execute code on Jupyter Notebook

I have been watching tutorials on data mining using python. I have installed Anaconda Python 3.5 package for windows 64 bit with default installation. I have made the program available to all users on my laptop. I am running windows 10 64 bit. I am able to open Jupyter notebook on localhost at http://localhost:8888 and browse to the folder than contains iPython notebook file. I can type commands in the text box but could not execute them. I don't know if this can be fixed by changing the current configuration. I have attached two screenshots for references. It is weird that the play button is missing. Instead a next button is shown at the same place. It will be greatly appreciated if someone could walk me through the steps. I do not know how to generate logs for debugging. But I am willing to try. Thanks everyone!
The info here http://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/Running%20Code.html says try shift+enter or green rectangle button. Would it not be easier to just save the file and run it from terminal with python (file)?
Try the "Cell" dropdown and "Run all" or while in the cell (the side highlight would be green), do shift + enter at same time.
Ipython has two modes: One to edit/run. Another to navigate.