Cannot install Jupyter Dashboards - ipython

I am trying to install jupyter dashboards from here: https://github.com/jupyter-incubator/dashboards
I installed pip install jupyter_dashboards and restarted and when I open the Notebook, I have the Deploy options in the File menu but I do not have the 'Dashboard view' in the View menu.
See here in the video the problem: http://recordit.co/br6CwoFc6I
How can I activate the dashboard view? Thanks

Related

JupyterLab application assets not found

I just downloaded jupyter lab using pip on my macbook. When I run jupyter lab on my terminal, browser opens with the following error:
JupyterLab Error JupyterLab application assets not found in
"/opt/homebrew/Cellar/python#3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/share/jupyter/lab"
Please run jupyter lab build or use a different app directory
I can run jupyter notebook with no problem.
Note: I can use jupyter lab by running jupyter lab --code-mode
This issue can be resolved by manually set the application directory: jupyter lab --app-dir /opt/homebrew/share/jupyter/lab, replace /opt/homebrew with the actual homebrew path.
Encountered this issue when installing jupyterlab with pip3.
Please run conda install jupyterlab instead. I tried this on with miniforge (https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh) and it worked.

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

Unable to acess pip modules in vscode jupyter notebook

I installed scikit-learn via pip3 but I can't access them in the jupyter notebook in the vs-code.
And when I am writing !sudo pip3 install -U scikit-learn in a jupyter cell, i can't enter the password for sudo.
Your Python version in the terminal is 3.8 and according to the very lower left hand corner of the screenshot you posted, the version of Python that VSCode is running is 3.9.0.
I'd recommend switching the version of Python that VSCode is running, by clicking on the version in the lower left hand corner of the VSCode window and selecting the one that matches the version in the terminal. That should solve it.

Open JupyterNotebook from VScode into the Browser

I have opened my .ipynb file with vscode (Python 3.9 Interpreter - installed jupyterlab), it's connected locally, how can I open it through the browser? what is the default port?
Type:
jupyter notebook in vscode terminal (Ctrl + Shift + ~) and it will start Jupyter in browser of your preference.
If jupyter not installed type:
pip install jupyter in elevated powershell or however you prefer to do installs.
If pip not installed:
python -m pip install -U pip
if python not installed I prefer to install with chocolatey and walkthrough is on their site. https://docs.python-guide.org/starting/install3/win/#install3-windows
I do not have a solution, but only hints. You can let Code start a local server via Ctrl + Shift + P, then Jupyter connect , then select default.
Unfortunately, it's not documented how you can access the server. I gave that feedback on the documentation page.
Source of the image: https://code.visualstudio.com/docs/python/jupyter-support#_connect-to-a-remote-jupyter-server
You can list all running notebooks and their tokens by typing jupyter notebook list in the terminal.
It will output something like this:
Currently running servers:
http://localhost:8889/?token=your_token :: /directory
You can click on the link to open it in the browser.
A solution for CORS-related issues:
In my case, the problem was in my CORS configuration. What fixed it for me was launching the notebook from the terminal with the allowed origin specified:
jupyter notebook --no-browser --NotebookApp.allow_origin_pat=https://.*vscode-cdn\.net
If, for some reason, that doesn't work, you could try the following as a last resort (bearing in mind this will allow ANY origin):
jupyter notebook --no-browser --NotebookApp.allow_origin='*'
Source:
https://github.com/microsoft/vscode-jupyter/wiki/Connecting-to-a-remote-Jupyter-server-from-vscode.dev

Jupyter Notebook "hidecode" tag not working?

I am trying to use the hidecode tag as shown here, but for some reason, it's not working on my local Jupyter Notebook server. The code remains visible, and no button on the right of the cell is displayed. I even downloaded the same notebook used in the page above, no dice.
I am running Ubuntu 18.04.2 LTS, Jupyter Notebook Server 5.2.2, Python 3.6.7, and IPython 5.5.0. The command I ran to start the server is sudo jupyter notebook --allow-root.
If you need any more info, please let me know. I appreciate any help I can get in figuring this out.
If you want to hide the code, the output or the prompt of your cells you can install the hide_code extension:
https://pypi.org/project/hide_code/0.2.0/
Stop jupyter
Run these commands
pip install hide_code
jupyter nbextension install --py hide_code
jupyter nbextension enable --py hide_code
jupyter serverextension enable --py hide_code
NOTE: I run the first two commands as root and the last two with the same user used to launch jupyter.
Restart jupyter
I found this extension very useful because I needed to print the notebook to a pdf file and all the tools like nbpublish, nbconvert was failing. In this way I can print the notebook directly from the "print" feature of the browser.