Error enabling splitcell/splitcell extension for jupyter notebooks - python

If I want split slides into two columns in my rise presentation, I have to install the jupyter_contrib_nbextensions:
pip install jupyter_contrib_nbextensions
but, I can't be enabled by running:
jupyter nbextension enable splitcell/splitcell
with this problem
Enabling notebook extension splitcell/splitcell...
- Validating: problems found:
- require? X splitcell/splitcell
Some solution?

Did you add the nbextensions to jupyter by running
jupyter nbextensions_configurator enable --user
or similar? See Step 2 of the nbextensions README.

Related

VScode fails to export Jupyter notebook to HTML - 'jupyter-nbconvert` not found

I keep on getting error message:
Available subcommands: 1.0.0
Jupyter command `jupyter-nbconvert` not found.
I've tried to reinstall nbconvert using pip to no use. I've also tried the tip from this thread with installing pip install jupyter in vscode terminal but it shows that "Requirement already satisfied"
VSCode fails to export jupyter notebook to html
I've also tried to manually edit jupyter settings.json file to the following:
"python.pythonPath": "C:\\Users\\XYZ\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\Scripts"
I've python 3.9 installed via windows store.
Any tip on what might be the issue for vscode doesn't want to export the notebook?
pip uninstall nbconvert
run CMD as admin
pip install nbconvert
Following above steps resolved my issue. Got this solution from this thread
Unsure exactly what fixed the issue but heres a summary.
Updated to python 3.10
Installed pandoc and miktex
Powershell reinstall nbconvert
Received warning that nbconvert script file is installed in a location not in Path.
Copied said location to System Properties - Envionment Variables - Path
Restart and install all miktex package on the go
PDF export and HTML export seems to work as intended now.
Here's my step to convert .ipynb to html:
Install required module: pip install nbconvert
Turn to the folder that contains .ipynb then run jupyter nbconvert --to html Text.ipynb
You may create a new virtual environment to avoid messing up global one then try again.
For your reference: nbconvert-PyPI and create virtual environment.
Quick answer:
import pip
package= ['nbconvert'] # install any package you need without any error forever
for i in package:
pip.main(['install', i])
After facing a similar problem, I tried to resolve it. None of these solutions didn't resolve my problem.
But found an alternative approach, tried opening the notebook by the following command and succeeded.
python -m notebook
If a notebook was not installed in your system, then install it with pip
pip install notebook
After opening your notebook into Jupiter, export it into your desired file.
I use Pyhton3 and have very limited packages in python, this caused a problem for me.
pip install nbconvert
also try using
pip3 install nbconvert

'jupyter' is not recognized as an internal or external command, operable program or batch file. after install jupyter also

I have recently degraded my python from 3.10 to 3.9 as few of the libraries were not working, specifically I was facing issue with jupyter installation. However since degradation of my python my jupyter command is not working as an example:
I am trying to convert my .ipynb file in .py with following code.
!jupyter nbconvert --to script 'test.ipynb'
or jupyter nbconvert --to script 'test.ipynb'
or trying to enable nbextension with following code
!jupyter nbextension enable
or !jupyter nbextension enable
I am getting an error which says:
'jupyter' is not recognized as an internal or external command,
operable program or batch file.
I have installed,
pip install jupyter
pip install jupyter notebook
not sure what else it is looking for. I am able to open my jupyter notebook and work. No problem there. Any suggestion will be appreciated, thank you in advance.
A better way to install Jupyter Notebook:
First, uninstall jupyter by pip uninstall jupyter.
Then, install jupyter through pip install --upgrade jupyter ipython.

How can I debug a dieing jupyter notebook ipython kernel?

When running my jupyter notebooks, the ipython kernel (Python 3.8, Anaconda) keeps dieing and being restarted.
I want to find what causes it to misbehave. Sadly, I can find no debugging information other than the kernel is dead and restarted.
How can I find more verbose information which may help with post mortem analysis? Is there any error log or something like that?
When you start Jupyter from a console with this command (may from the Anaconda terminal):
jupyter notebook --debug
then it will print extended logging messages. You may also pipe those messages into a separate logfile.txt using
jupyter notebook --debug > logfile.txt 2>&1
Can you try uninstalling all of:
ipykernel
ipython
jupyter_client
jupyter_core
traitlets
ipython_genutils
And then install again. If you're doing this inside a conda env, it might be easiest to create a new environment and start from scratch. Also, if you're going to install with conda, run conda clean -tipsy to clean up conda caches before you start

Installing a jupyter notebook extension

I tried without success to install some extensions to jupyter notebook and can't figure out how to do it.
So basically I would like to have pep8 code checking in my notebook.
I checked this post:
Verifying PEP8 in iPython notebook code
However %install_ext is deprecated so instead I used
jupyter nbextension install https://raw.githubusercontent.com/SiggyF/notebooks/master/pep8_magic.py --user
So I get:
Copying: /tmp/tmpw74yl7m2/pep8_magic.py -> /home/louis/.local/share/jupyter/nbextensions/pep8_magic.py
To initialize this nbextension in the browser every time the notebook (or other app) loads:
jupyter nbextension enable <the entry point> --user
From now on I could not get it working.
I tried:
~$ jupyter nbextension enable pep8_magic.py --user
Enabling notebook extension pep8_magic.py...
- Validating: problems found:
- require? X pep8_magic.py
Without success.
Can someone explain a simple method to get it working and what I missed about jupyter extensions ?
Thank you !
I manually copied the file from the link and then added to /.ipython/extensions (or /nbextensions) and loaded in the notebook: %load_ext pep8_magic
Currently testing but looks fine to me

Updating ipython - jupyter giving internal server error

I just upgraded my ipython (version 0.13.2, so quite old)
conda update ipython
then installed jupyter
pip install jupyter
When I now start a notebook
jupyter notebook
I get an internal server error, and an error stack on the console that seems to boil down to
File "//anaconda/lib/python2.7/site-packages/notebook/templates/tree.html", line 8, in template
data-base-url="{{base_url | urlencode}}"
TemplateAssertionError: no filter named 'url encode'
Any ideas of what I did wrong/how to fix this?
Try to reinstall jupyter with conda, remove pip installed jupyter:
pip uninstall jupyter
And install jupyter with conda:
conda install jupyter

Categories

Resources