Jupyter Notebook's RISE Missing Slideshow Button - python-3.x

I followed the instructions on installing RISE for Jupyter notebook with Anaconda (conda) but the "Enter/Exit RISE Slideshow" button never showed in the toolbar.
I followed the recommendations on solving the problem in the two closed RISE issues (#137, #275), but with no luck. I updated Jupyter to the latest version, started a new notebook, hard refreshed the browser page, reinstalled Rise and still no button.
I also saw this SO question, which is different from my case since I never saw the button, and I do not have nbextensions to begin with. Still, their recommendation did not work.
For practical reasons, I cannot have a separate environment just for RISE and presentation making.
I'm having the same problem on two machines, with different operating systems and different Conda packages, so it may be a RISE package problem. On one of the machines, I have:
Google Chrome 66.0.3359.117 (64-bit)
conda 4.5.1 with python 3.6.4
jupyter 1.0.0
jupyter_core 4.3.0
notebook 5.0.0
rise 5.2.0 py36_0 damianavila82
MacOS High Sierra (10.13.4)
My conda packages seem to be in good shape and without missing dependencies too.
$ jupyter nbextension list
Known nbextensions:
config dir: /Users/welshamy/Applications/anaconda3/etc/jupyter/nbconfig
notebook section
jupyter-js-widgets/extension enabled
- Validating: OK
rise/main enabled
- Validating: OK

This is a package compatibility issue. I solved the problem by doing the following:
Upgrade conda packages from the command line:
$ conda update --all
Restart jupyter-notebook session.
Restart web browser.
Open a new notebook.
Done.

Just restart the browser
if not create a new notebook

Related

Just updated Ubuntu to 22.04, now I can't open Jupyter Notebook

When I try to launch Jupyter Notebook, the browser launches and I get the following error:
Access to the file was denied
The file at /home/benjamin/.local/share/jupyter/runtime/nbserver-11758-open.html is not readable.
It may have been removed, moved, or file permissions may be preventing access.
I tried running
jupyter lab clean --all
pip3 install jupyterlab --force-reinstall
as per the suggestion from here: Jupyter Notebook: Access to the file was denied. The commands ran, but I still get the Access to the file was denied error. Also, on the reinstall command it spits this out:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
spyder 4.2.5 requires pyqt5<5.13, which is not installed.
spyder 4.2.5 requires pyqtwebengine<5.13, which is not installed.
conda-repo-cli 1.0.4 requires pathlib, which is not installed.
anaconda-project 0.9.1 requires ruamel-yaml, which is not installed.
spyder 4.2.5 requires jedi==0.17.2, but you have jedi 0.18.1 which is incompatible.
spyder 4.2.5 requires parso==0.7.0, but you have parso 0.8.3 which is incompatible.
sphinx 4.0.1 requires Jinja2<3.0,>=2.3, but you have jinja2 3.1.1 which is incompatible.
sphinx 4.0.1 requires MarkupSafe<2.0, but you have markupsafe 2.1.1 which is incompatible.
python-language-server 0.36.2 requires jedi<0.18.0,>=0.17.2, but you have jedi 0.18.1 which is incompatible.
fermipy 1.0.1+5.g5a57 requires astropy<4, but you have astropy 4.2.1 which is incompatible.
which may or may not be part of the problem.
Cross posted here: https://discourse.jupyter.org/t/after-updating-to-ubuntu-22-04-i-am-no-longer-able-to-access-jupyter-notebook/13991
here: https://askubuntu.com/questions/1404330/after-updating-to-ubuntu-22-04-i-am-no-longer-able-to-access-jupyter-notebook
and on reddit: https://www.reddit.com/r/learnpython/comments/uaipzo/i_just_updated_my_machine_to_ubuntu_2204_now_i/
UPDATE: I am able to access the notebook now by using the URL printed to the console. (just copy and paste it into the Firefox browser)
I would still like to figure out how to get it to open with just the 'jupyter notebook" command the way it used to work before the update, but for now this is a useful workaround.
did you try setting
c.NotebookApp.use_redirect_file = False
In the jupyter_notebook_configuration.py file?
If you tried, did you remove the '#' at the start of the line?
I had the same problem with Ubuntu 22.04 and this fixed it.
I first created the file with :
jupyter notebook --generate-config
then I uncommented and change the line c.NotebookApp.use_redirect_file as you said
and now it works !
I faced the same issue using Firefox from snap on Ubuntu 22.04.
I noticed that setting c.NotebookApp.use_redirect_file = False in generated jupyter_notebook_config.py works when launching jupyter notebook, but fails for jupyter-lab (error you pasted). I found that doing something similar to fix the problem for jupyter-lab:
jupyter server --generate-config
Then edit the generated ./jupyter/jupyter_server_config.py and set c.ServerApp.use_redirect_file = False. Now running jupter-lab works in snap firefox too. Maybe you can try this way and just run via jupyter-lab if it works for you too.
Btw. none of this is needed if you just use Chrome, somehow the problem only occurs for firefox from snap on Ubuntu 22.04.
Otherwise you could check out jupyter notebook --debug and/or reinstalling JupyterLab.
I use epiphany web browser instead of Firefox as a default web browser and everythings work fine
The problem I found is that the launcher is not using a path to Jupyter Notebook that works. From terminal I get:
$ whereis jupyter-notebook
jupyter-notebook: /home/brombo/miniconda3/bin/jupyter-notebook /home/brombo/.local/bin/jupyter-notebook
The command /home/brombo/miniconda3/bin/jupyter-notebook will start notebook but /home/brombo/.local/bin/jupyter-notebook will not. If you use the first in the exec line of .local/share/applications/jupyter-notebook.desktop everything works -
[Desktop Entry]
Name=Jupyter Notebook
Comment=Run Jupyter Notebook
Exec=/home/brombo/miniconda3/bin/jupyter-notebook %f
Terminal=true
Type=Application
Icon=notebook
StartupNotify=true
MimeType=application/x-ipynb+json;
Categories=Development;Education;
Keywords=python;

Spyder debugger freezes within Anaconda virtual environment

I'm working with an Anaconda virtual environment, venv, and I'm running Spyder from it.
Whenever I attempt debugging my code, nothing happens. The debugger seems to get stuck in the first line. For example, if I run the debugger on:
import sys
print(sys.executable)
Running in debug mode produces this output on the built-in IPython console:
debugfile('C:/Projects/Myproject/myscript.py', wdir='C:/Projects/Myproject')
> c:\projects\myproject\myscript.py(1)<module>()
----> 1 import sys
2
3 print(sys.executable)
Neither Debugging buttons in Spyder, nor their related shortcuts, seem to do anything. In particular, pressing the Stop button (or hitting CTRL+SHIFT+F12) results in:
--KeyboardInterrupt--
For copying text while debugging, use Ctrl+Shift+C
I have already made some research, and landed on this GitHub issue page, where it is suggested that I should update IPython. I did, with no benefit.
Another suggestion I found in this other GitHub page indicated the problem might be that the wrong executable for Python is run (i.e., that Spyder is running Python from my base Anaconda environment, rather than my venv). I checked, and both are run from the right path:
print(sys.executable)
C:\Anaconda3\envs\venv\python.exe
These are the version of my dependencies.
Spyder version: 5.1.5 None
Python version: 3.7.11 64-bit
Qt version: 5.9.7
PyQt5 version: 5.9.2
IPython 7.31.1
Operating System: Windows 10
I face the same issue, Spyder 5.1.5 debugging does not work in new environments. There is some clash between versions as I understand, but promised that they will deal with the issue in the next version.
Also, this is a reported issues: https://github.com/spyder-ide/spyder/issues/17350
What seems to work for me is to create a new environment but specify the versions like this:
conda create -n your_fancy_env_name -c conda-forge python=3.8.10 spyder=5.1.5

Anaconda only comes with anaconda prompt

I used to have the whole anaconda package on my Windows 10 computer (an HP Envy) until recently, Windows 10 updated and the update caused problems so I restored the previous version of windows (keep in mind, I installed Anaconda about 3 updates ago so restoring should not have caused a problem). A few days later, I tried to use Jupyter but "jupyter notebook" no longer launched Jupyter when typed into PowerShell. I tried uninstalling and reinstalling with all different preferences (i.e. me only, all users, PATH, no PATH, etc.) but it still installs as only the anaconda prompt. When I type conda --version in PowerShell, my error says "The term conda is not recognized" ...
Does anyone have any suggestions? I really need to use Jupyter. Thanks!

Anaconda menu failed

I tried downloading/installing Versions 3.4, then 3.6 of Anaconda on Windows 10. Each time. I got an error message that the Anaconda menu filed to load.
I did a re-try, then even tried to IGNORE, but then I got another message that the directories had failed to load. Are these versions meant for Windows 10?
Thanks - Steve
This has come up quite a bit. It should be fixed in Anaconda4.3.1. It often happens when installing to all user areas and if you have spaces or unicode characters in the username. It is best to install to your user directory. Even though it gives an error Anaconda is still installed, it just didn't make the Start Menu items. You can install them yourself:
conda install -f console_shortcut ipython ipython-qtconsole anaconda-navigator spyder jupyter

iPython 3 Notebook raising ImportError: No module named 'IPython.frontend.html'

The iPython 2 console and notebook as well as the iPython 3 console work fine on my system.
But running ipython3 notebook gives an ImportError saying No module named 'IPython.frontend.html' and this traceback.
I think it may have something to do with Ubuntu RR package problems, but I'm not sure.
10x.
Ubuntu split the notebook functionality away form the main ipython3 package into ipython3-notebook in Raring.
Now installing ipython3 should install ipython3-notebook for you automatically as it recommends it; but when I had this problem, Raring critically depended on a package of python3 too high for python3-zmq which was depended on by ipython3-notebook causing ipython3-notebook' to not be installed (which I did not notice). Whew...
This might be due to the fact that the package layout has been change and IPython.frontend.html is now IPython.html do you have dev version installed by any chance ?
I had this problem and fixed it by upgrading ipython (using --upgrade)

Resources