Jupyter notebook not opening from Centos 7 - python

I have recently installed jupyter notebook on Centos 7. I have been trying to get it launched on my browser from past 2 days and have tried every answer on stack overflow. It stopped showing " No web browser found " when i type it on the command terminal. But when i copy and paste the link onto the google chrome browser it's showing, This site can't be reached.
How will i resolve this issue?

If you follow carefully the instructions on this post, you'll solve your problem.
I went through the same situation and followed these steps.
https://techknight.eu/2016/01/03/setup-jupyter-notebook-centosrhel-7/
The key is to :
Modify the configuration .py file with your desired values (specially the IP on wich the notebook will run).
Allow the port you're gonna use throug the CentOS firewall
In any case, if you break the configuration and you need a fresh start, you can always do:
jupyter notebook --generate-config
And the file will regenerate with default values.
Good Luck

Related

Working & debugging remotely with VS code & jupyter notebook

I have recently started working with VS-Code & Python Jupyter Notebook remotely using SSH and it was great until now. Almost had the experience of working directly on the server as I was able to execute and debug the notebook cells.
As I swapped between servers (containers / VDIs with the same file system), something might have happened to the remote extensions. The debugging had stopped working. I click on the debug button for a notebook cell, but the debug toolbar does not reach the breakpoint. The step option does not appear on the debugging screen.
Any suggestions on how to analyze/solve this would be appreciated.
Thanks
Looking on the vscode various logs (I think it was the python log) I found an exception occurs when I tried to step a single line. Searching further on the network I found this:
https://github.com/microsoft/vscode-jupyter/issues/8803
In short downgrading my ipykernel package from 6.8.0 to 6.7.0 did the trick and solved my problem.

Jupyter notebook in blank when initiating a notebook - remote desktop

I'm trying to run jupyter notebook on a remote desktop, which is highly secured (i.e. I had to activate scripting on internet explorer to be able to log in into outlook).
I am really new to this remote desktop thing and I would like to know why is this happening and if it has a solution. As a finance student, I really struggle with this stuff.
I used miniconda to run this. Also, this is shown in the terminal before opening the jupyter notebook window:
"[W 09:21:35.153 NotebookApp] Terminals not available (error was DLL load failed while importing winpty: The specified procedure could not be found.)"
What is shown when I open a notebook
Best regards,
I'm not sure Internet Explorer supports jupyter notebooks, try with another browser if you can.

Jupyter notebook not initializing correctly without error message

I am having trouble with Jupyter Notebooks (with Anaconda) on a Windows 10 PC from work.
Yesterday I left the laptop running a little script on a Jupyter-Notebook, forgot to check it and it turned off due to battery.
Today, when I open Jupyter-Notebook I cannot use it at all. Here I share some screenshots.
The CMD output when launching Jupyter-Notebook (some info deleted since its a corporate pc, such as user).
The "landing page"
When I create a new python file.
As you can see, no error message is displayed on the cmd but the application is useless. I cannot see any existing documents or browse folders to open anything. When I start a new file it just stays in "about-blank".
I would need some help to get this working again, thanks a lot in advance!
update
When in firefox I go to the console I find that the error is generated by cookie config. It says something like
"Some cookies are making an incorrect use of recommended attribute
"SameSite" The cookie "username-localhost-8888" will be rejected soon
because it has the attribute "<SameSite" set to "none" or an invalid
value without "secure".
I have not yet found how to change this.
It also says
Uncaught TypeError: "#element".tooltip is not a function

Why IPython Console in Spyder4 updates constantly when connecting to remote kernel on server?

I followed the instructions on the official Spyder page and successfully connected to remote kernel via SSH. However I have a problem in my Ipython Console as it refreshes every 2-3 seconds adding In [1]: lines infinitely. I suppose it is refreshing of a state on server, but could someone explain what is this, why this happens and can I turn it off, so that the Console behaves the same as when I work on my local kernel(without infinite adding of empty lines)?
The solution could be found here in post of scott-8: https://github.com/spyder-ide/spyder/issues/10240#issuecomment-543913159
The copy of the answer:
Don't know about the issue above, but here is what solved my issue for anyone reading: instead of running python -m spyder_kernels.console and connecting to the kernel, quit the kernel after running it. Then restart the kernel with python -m spyder_kernels.console -f kernel-xxxxx.json, specifying the file that was just created in the runtime directory, and connect to it. This fixed my problem for some reason.

Additional Jupyter Notebooks do not start on next available port

When using Jupyter Notebook on Windows 10 and starting multiple notebooks, each would open on the next available port (the first would be on port 8888, the next on 8889, etc.). I installed Anaconda on Windows Subsystem for Linux (WSL) and have had no issues, except when I try to start another notebook, it opens the same page wherever my previous notebook was started. Manually setting the port on startup like jupyter notebook --port 8889 works, but now I'm spoiled with letting jupyter figure it out for me.
I had to set an alias for the default browser, which is a Windows executable (export BROWSER='/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'). Additionally, I've generated a notebook configuration file, but I haven't figured out if it's doing anything.
Thank you!
I'm not exactly sure what your question is but I may be able to help you with your config file and default browser.
The following is my jupyter_notebook_config.py file:
c = get_config()
c.NotebookApp.browser = 'chrome.exe -incognito --app=%s'
c.NotebookApp.open_browser = True
chrome.exe is the windows executable file for google chrome which is put on my $PATH variable as follows:
export PATH=/mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application:$PATH
The -incognito flag starts chrome in incognito mode. This results in the nice incognito dark theme and insures that the chrome extensions don't interfere with anything
The --app=%s flag is REALLY great, it starts the web page in "application mode" which removes the tab bar from the chrome window.
P.S. I'm also annoyed about the port issue and haven't found a nice work around.
Hope this helps!

Categories