Jupyter Notebook Extensions Fail to Load - jupyter-notebook

I am running Ubuntu 14.04 in virtual box with a recent anaconda install. I installed jupyter notebooks using conda. I have followed all of the documentation that I can find online to install notebook extensions but they fail to load with the error messages listed below. The first error is from the jupyter notebook app running in a terminal and the second error is in the chrome java console. Notice that I cannot post this question with this many hyperlinks so I remove the "p" from "http" in my error messages.
[W 07:02:06.451 NotebookApp] 404 GET
/nbextensions/python-markdown.js?v=20150904070147 (127.0.0.1) 8.47ms
referer=htt://localhost:8888/notebooks/Untitled.ipynb
htt://localhost:8888/nbextensions/python-markdown.js?v=20150904070147
Failed to load resource: the server responded with a status of 404
(Not Found)
To detail my installation method: I cloned the git repository [IPython-notebook-extensions][1] and used the command jupyter-nbextension install python-markdown inside the IPython-notebook-extensions/usability/ folder. I then enabled the extension with jupyter-nbextension enable python-markdown. I ran these commands as superuser as well.
After this failed I installed this extension inside python (from the usability/ directory of the repository) using:
import notebook
notebook.install_nbextension('python-markdown',user=True)
E=notebook.nbextensions.EnableNBExtensionApp()
E.enable_nbextension('python-markdown')
I also tried this as the superuser without the parameter user=True.
I have confirmed that the files copied to both /usr/local/share/jupyter/nbextensions/python-markdown and ~/.local/share/jupyter/nbextensions/python-markdown. The extension is enabled in the ~/.jupyter/nbconfig/notebook.json file. Finally, I also deleted the chromium and mozilla cache (by deleting the folders in the ~/.cache directory) multiple times while trying this.

Solved here: https://github.com/ipython-contrib/IPython-notebook-extensions/issues/282. The ~/.jupyter/nbconfig/notebook.json file must be edited to use python-markdown/main instead of python-markdown.

More generally this kind of error can also happen after you've upgraded Jupyter/Python/etc and some of the extensions are not supported by your updates. You can then just disable them from the Nbextensions configuration tab - you may find that they're the extensions that are shown as incompatible - which can be disabled by ticking the 'disable configuration for nbextensions without explicit compatibility' checkbox.

Related

Issues installing Jupyter Lab Git extension: Mismatched front/backend versions

Here are my steps for installing Jupyter Lab and the Git extension, and then trying to troubleshoot the extension version mismatch problem:
Specs: MacOS Mojave 10.14.6, Jupyter Lab 3.0.5
1. I installed Jupyter Lab using pip3 install jupyterlab
2. I installed the Jupyter Lab Git extension directly from Jupyter Lab's Widgets Manager:
3. After doing so I received additional instructions:
4. I clicked 'OK' and then ran pip3 install jupyterlab-git
5. Back in Jupyter Lab, it said a build was needed to include the latest changes, so I selected 'Rebuild'
6. The build was successful, and I clicked on 'Save and Reload'
7. Upon reloading, I received the following message:
8. I followed the instructions and ran pip3 install --upgrade jupyterlab-git
9. I went back to Jupyter Lab and clicked "Dismiss" on the message.
10. I closed and reopened Jupyter Lab via terminal. After reopening, the same "failed to load" message appeared.
11. I then found this link troubleshooting a similar issue.
12. I followed the advice by running all of the below commands (with pip3, and fixing spelling errors):
13. The user then suggests the following to make sure everything worked OK. So I closed Jupyter Lab again, and ran all of the following:
14. Running jupyter serverextension list I get the following, which I think looks OK:
15. Then I ran pip3 list and get back: jupyterlab-git 0.23.3 (so Git extension version 0.23.3, which according to the GitHub extension page at the time of me writing this is the most current (non-beta) version).
16. Then I ran jupyter labextension list and see nothing related to the Git extension, which is not expected per the above user's screenshots (it's supposed to show the Git Extension here):
17. Now here's one last thing: When I go back and install the Git extension via Jupyter Lab's Extension Manager (like I had done initially), and then I run jupyter labextension list again, I see that the Git extension is the "pre-release" version v0.30.0b1, which would likely be why way back in step 7 I got the error message that the frontend and backend extensions did not match.
And here's where I'm stuck. I can't seem to get these two extension installations to match (or to ever have the extension icon show up in the side panel).
And around and around I go...
EDIT: Possible solution.
After reading my own question here, I thought maybe I should try to install the "pre-release" Git extension version to match the other version, and that seems to have worked. I just didn't think it was best practice to use "pre-release" or beta versions, so that had not occurred to me until just now. So I'm not going to "solve" my own question here, because I'm just not sure this is the best solution... But is it?
I ran this: pip3 install jupyterlab-git==0.30.0b1 and now I'm no longer seeing any version mismatch errors, and the Git extension icon is finally showing up in the side panel.
They versions need to match as per #779
What worked for me was:
pip install --upgrade --pre jupyterlab-git

Jupyter notebook not creating config files in the specified directories

When I run jupyter notebook I get: Your file couldn’t be accessed It may have been moved, edited or deleted in chrome.
I checked jupyter --path and looked at the directories listed and most of them don't exist, I tried reinstalling and I'm getting the same issue.
I manually copied the url with the token and I was able to run jupyter notebook but I can't find the config, data or runtime.
Edit: I previously installed iJava but didn't reinstall but it appears when I run jupyter notebook making me think it didn't uninstall properly. Not sure how else to uninstall it considering I can't find the installation path.

Anaconda Navigator Jupyter and Spyder won't start after successful installation

I have installed Anaconda 3 on Windows 10 64-bit. The installation completed successfully. I could start idle.exe and it works. I can start the Anaconda Powershell and Anaconda Prompt, but I cannot start the Navigator nor Spyer or Jupyter. Launching them from the start menu will bring up the Windows shell windows for a moment, before they disappear and nothing happens.
I have tried starting the navigator from the Anaconda Prompt and this is what the error message looks like:
(base) PS C:\Users\Frank> anaconda-navigator.exe
Traceback (most recent call last):
File "C:\Users\Frank\Anaconda3\Scripts\anaconda-navigator-script.py", line 10, in <module>
sys.exit(main())
File "C:\Users\Frank\Anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 103, in main
from anaconda_navigator.app.start import start_app
File "C:\Users\Frank\Anaconda3\lib\site-packages\anaconda_navigator\app\start.py", line 34, in <module>
from anaconda_navigator.widgets.main_window import MainWindow
File "C:\Users\Frank\Anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window.py", line 37, in <module>
from anaconda_navigator.utils.analytics import GATracker
File "C:\Users\Frank\Anaconda3\lib\site-packages\anaconda_navigator\utils\analytics.py", line 44, in <module>
from anaconda_navigator.external.UniversalAnalytics import Tracker
File "C:\Users\Frank\Anaconda3\lib\site-packages\anaconda_navigator\external\UniversalAnalytics\Tracker.py", line 28, in <module>
from six.moves.urllib.request import (HTTPSHandler, Request, build_opener,
ImportError: cannot import name 'HTTPSHandler' from 'six.moves.urllib.request' (unknown location)
I have searched the internet for root causes of the last line in the error message with no success. There are a few tips how to fix it, but nothing worked.
The exact version I have installed is Anaconda3-2019.10-Windows-x86_64.exe.
I have tried uninstalling and reinstalling Anaconda in all different "flavors":
for all users, without adding the path to the environment variables
for all users, with adding the path to the environment variables for
current user, without adding the path to the environment variables
for current user, with adding the path to the environment variables
Anaconda is installed into a directory without spaces in its name and no fancy characters: c:\users\frank\Anaconda3.
I have removed .anaconda and tried launching the navigator, spyer and jupyter again with no success.
Spyer comes up with a message that it had crashed during the last session. I followed the advice and deleted the .spyder-py3 folder, but no change.
How can I find more information about the reason for the problem on my system? Are there any log files that contain more information? I checked if HTTPSHandler is defined where Anaconda would search for it (please consider my limited expertise in Anaconda, when assuming where to look for resources...).
I installed the same Anaconda3 version on another computer and it works right from the start.
After reading another suggestion about updating conda using conda update conda and trying it on the Anaconda prompt I received the following error:
(base) PS C:\Users\Frank> conda update conda
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/current_repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/main/win-64/current_repodata.json (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
I had the idea that SSL could be a problem and uninstalled OpenSSL v1.1.0g (Win64), then checked again. That doesn't help. Installing OpenSSL v1.1.0g (Win64) again doesn't make a difference either. On the other hand I would have assumed that Anaconda brings all components and modules it needs.
Any ideas how to continue troubleshooting?
I kept digging for answers and came across a discussion at GitHub:
CondaHTTPError: Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available)
I followed the advice, uninstalled my OpenSSL version and installed the latest one from the page https://slproweb.com/products/Win32OpenSSL.html. This is now "Win64 OpenSSL v1.1.1d" and right after the installation all the issues with Anaconda were gone. I can use conda to update, the Anaconda Navigator comes up, Jupyter Notebook works. All is fine.

How do i install beautify in brackets editor

I am trying to install beautify via the extension manager but I'm getting an error:
" installation failed, unknown internal error"
i can see clearly that brackets is connected to internet because when i try to search for beautify extension i see the results.
I don't think this is a problems with the beautify extension but the brackets installation itself. In particular, the local nodejs installation. See https://github.com/adobe/brackets/issues/12538. This seems to be preventing ANY extension from being installed.
If you navigate to the brackets directory you should see the local brackets node installation. In the console here type node -v. This should give you the node version, but if it gives you an error message then the problem is with that installation of node.
Are you on windows? I solved this problem by copying from my own installation of node the node.exe from C:\Program Files\nodejs to C:\Program Files\Brackets. Of course, I don't know if this could have any unforeseen side effects - but it seems to work.

RStudio Server Initialization Error: Status code 500 returned

When I login to RStudio server installed as an Amazon Machine Image, I, I see the message "RStudio Server Initialization Error" and "Status code 500 returned," as in the screenshot. When I click OK, nothing changes.
What does this mean and how can I fix this?
Refer the following link. It will guide you about the complete installation of R-Studio Server along with required dependencies.
Automated Installation of R-Studio Using Shell Script
It would be useful if you could state which version of RStudio Server you are using. Neverthless, you can try the following:
Install the most recent version using: wget http://download2.rstudio.org/rstudio-server-0.98.1103-amd64.deb. If you want 32-bit version wget http://download2.rstudio.org/rstudio-server-0.98.1103-i386.deb.
Delete the startup files (.Rprofile, .Renviron, and .RData) from your initial working directory, which should be user's home.
Check if you can run R from command line and if your are getting any error messages - fix that first

Resources