My problem is very similar to this question.
I'm not able to remove a chart I originally rendered with holoviews, despite shutting everything down. I'm reduced to opening the ipyb in sublime to see if I can find the relevant json section and rip it out by hand.
In fact, please reference that link to see the example screenshot, since I can't share anything which contains company data.
However, unlike that question, I don't have any extensions installed:
jupyter labextension list
JupyterLab v0.34.9
No installed extensions
Here are the relevant versions:
conda list|egrep -e "holoviews|bokeh|jupyter"
bokeh 1.0.1 py36_1000 conda-forge
holoviews 1.10.9 py_1 conda-forge
jupyter 1.0.0 py_1 conda-forge
jupyter_client 5.2.3 py36_0
jupyter_console 5.2.0 py36_1
jupyter_core 4.4.0 py36_0
jupyterlab 0.34.9 py36_0
jupyterlab_launcher 0.13.1 py36_0
I rendered a (sankey) chart with holoviews and it was rendered outside the cell, at the top of the jupyter lab screen. Now, the chart won't go away, despite the following:
Restart the kernel
Clear all cells
Shut down the kernel, close the lab, make sure it is not running! Yes, the chart survives even closing the originating jupyter lab window!
Related
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 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.
Jupyterlab search function is not working properly. It finds patterns but doest jump to them as in the gif bellow. The pattern is obviously in the notebook, confirmed with grep.
This happen with all notebooks. Sometime when the pattern is displayed on the same page. It does finds it and jumps to it. The behavior is the same in code or markdown cell and also in the notebook checkpoint file.
When the notebook is opened in the classic notebook, the cells are visible.
I have deleted all other cells and save only one of the problematic cells. That cell is now visible in jupyterlab!
I had the same issue. For me it seemed to be that the jupyterlab toc extension wanted nodejs 12+ which isn't available from the standard conda channels at the moment.
This fixed it for me:
conda install -c conda-forge nodejs
I'm trying to create graphs using plotly for the first time. Since I'm currently using Visual Studio Code for my coding (either python scripts or notebooks), I'm currently trying to use plotly in VSC.
I've installed everything from the plotly getting started page (conda installed plotly, notebook, ipywidgets and even jupyter) but I'm still getiing an error when importing.
The thing is, when I've tried importing plotly in a python file in VSC, it's running well. I've also tried running it in a Jupyter Notebook and it's also running.
import plotly.express as px
I'm pretty sure that I've installed everything in the correct environment and I'm using the same environment all throughout.
What do I need to run plotly in a notebook in VSC?
It seems like your python versions/pip versions are different (especially if you're using an env). In Visual studio Code, you can bring up a simple terminal directing to the directory of your project (or env). Just click Terminal > New terminal. This will bring up a terminal (like CMD or terminal) at the bottom of the screen.
From then you can check the version of Pip and python for either your system globally, or the version install in your env. As long as your env is activated, then it will check the versions for the env, not your system.
For macOS:
To show all python installations of your system:
which -a python
To get the version for python 3 (which is what you should be on):
python3 --version
To get the version for pip:
pip -v
For windows:
python3 --version
pip -v
If the versions are incorrect then you can either install the right version of pip in your env or change python paths. First option is recommended.
If you are using macOS. Entering the command which -a python will show a very old Python 2.X version. Do not tamper with this or it's path as it is needed by macOS to run.
When I write something in the jupyter notebook markdown field, the typos are not highlighted and often I ended up with something like this:
In almost all IDEs I have used so far, the typos are highlighted with a curly underline which was very convenient for me. Something like this:
Up till now I have not found anything that allows me to see this type of highlights. Does it exist?
The popular Jupyter Notebook bundle extension from Jupyter-contrib contains a spell checker. You can install and enable this (with admin privileges) like so:
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable spellchecker/main
This may be the most popular spell checker for Jupyter Notebooks, but note that it simply highlights words not in its dictionary, and does not offer corrections.
If the extension installed properly, you will see this message in the command line:
Now, in the browser, after opening Jupyter, you will see the button labelled "abc" beside the keyboard button, which you can toggle to enable/disable spell check:
The jupyter-contrib library has many other useful modules such as code folding and table of contents.
Run the following in a terminal:
ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-spell-check-1.0.zip
ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-document-tools-1.0.zip
ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-cell-tools-1.0.zip
jupyter nbextension enable calico-spell-check
You can see typos like
Find out more
Afterwards, you need to activate the spell check in the Jupyter Notebook:
%%javascript
IPython.notebook.config.update({
"load_extensions": {"calico-spell-check":true,
"calico-document-tools":true,
"calico-cell-tools":true
}
})
The spellchecker and some other extensions from jupyter_contrib_nbextensions is incompatible with the ipython version 5.8.0. and later. (Found that it works in some cases for the version 5.0.0 [refer issue page of the same]. I'm not aware of its compatibility for the ipython versions between 5.0.0. to 5.8.0., please do comment if anyone knows).
The calico's nbextension 'spellchecker' available at https://bitbucket.org/ipre/calico/downloads/calico-spell-check-1.0.zip is an outdated version [dated 2015]. But calico had updated their nbextensions and made avaliable at the github repository [latest dated 2018]. It works fine for the ipython version 5.8.0.
Installation
git clone https://github.com/Calysto/notebook-extensions.git
cd notebook-extensions
jupyter nbextension install calysto --user
jupyter nbextension enable calysto/spell-check/main
Check its status:
jupyter nbextension list
When you now open or reload a notebook, there would be a new button visible with a check mark icon next to the button to open the command palette. You may click on it to check the spelling mistakes in the markdown cell.