How to make chrome compatible with Jupyter for Anaconda? - python

I am an anaconda user and Jupyter is a neat tool to run python code. However, for my macbook, I can't open it in Chrome (This page isn’t working
localhost didn’t send any data.),but it works in Safari, I have tried to reinstall chrome, but I still can't fix it. My system is Mac OS 10.11.5.
Who knows how I can fix it?
I can understand that the problem might be not specific enough, but I have been puzzled by this problem for quite a period of time.

There was a similar problem in the git page for Jupyter:
https://github.com/jupyter/notebook/issues/2438
Try going to directly to http://localhost:8888/tree
or whatever port you are using.

Download jupyter notebook from link below
Download jupyter notebook
Once you downloaded it, run it any browser it will work

Just copy paste the link with token from the terminal to chrome.
It should work after that.
The steps are :
Cd to directory u want to go to
Type jupyter notebook , a browser window opens up after this command.
If safari opens up copy paste the link from safari to chrome.
It might ask u for a token the first time. That can found in the terminal where jupyter command is typed.

Related

Run Jupyter Notebook with Admin Priveleges in Linux

I am trying to webscrape a javascript website. In order to do this I am reviewing a chapter in this text:
https://yanfei.site/docs/dpsa/references/PyWebScrapingBook.pdf
and trying to reproduce an example which uses this script:
from selenium import webdriver
import time
driver=webdriver.Firefox(executable_path='')
driver.get("http://pythonscraping.com/pages/javascript/ajaxDemo.html")
time.sleep(3)
print(driver.find_element_by_id("content").text)
driver.close()
When I run this I get a permission denied error in the third line. I am not completely sure(correct me if I am wrong), but I think the reason is because I am on a Linux machine and I am not running Jupyter notebook as an administrator. However, I cannot figure out how to do that. If I go to the terminal and write:
sudo jupyter notebook
it says that the command is not found, even though just writing jupyter notebook is how I open the application from the command terminal. I have tried running anaconda navigator and the same thing happens. My question is whether or not the administrator issue seems like the correct answer to the above problem, and, more generally, how do I run the application as an administrator.
You maybe haven't got the geckodriver installed? I install pygeckodriver via pip and firefox-geckodriver viz apt and it now works without the "executable_path" parameter

Jupyter - Not sure if not working or broken link

I am trying to open a notebook with jupyter, by using the following command:
jupyter notebook notebook.ipynb
I use Linux and python2, I have installed jupyter inside a virtualenvironment with pip.
When I run the command above, what happens is that I get a new screen
REFRESH(1 sec): http://localhost:8889/notebooks/mylink
This page should redirect you to Jupyter Notebook. If it doesn't, click here to go to Jupyter.
However, there is no dashboard opening automatically. So, I clicked on the link, but I am unable to connect. The weird think is that I don't remember what I did yesterday, but I managed to get through very easily.
Am I doing something wrong? Or maybe there is a problem with the link?
EDIT: If I run
jupyter notebook.ipynb
I get
Error executing Jupyter command 'notebook.ipynb': [Errno 2] No such file or directory
which does not make sense, because the file notebook.ipynb is actually there.
If I type
jupyter notebook stop
I get
There are no running servers
Happened to me too. Also their troubleshooting could not resolve the issue. You may note the This Worked An Hour Ago section.
If you are using environments, try creating a new environment and install jupyter notebook from scratch there. For Anaconda it would look like this:
conda create --name jupyter_env
conda activate jupyter_env
conda install -c conda-forge jupyterlab
jupyter notebook
You may change jupyter_env to a differen name of your liking.
What I usually do is run
jupyter notebook
and it will automatically open up the browser with my current directory. I then search for my notebook that way.
I guess one of these could help you fix this one:
change url to http://127.0.0.1:8889/notebooks/mylink or http://0.0.0.0:8889/notebooks/mylink
in case proxy or any other network settings set on your browser, disable them and check twice
if none of them did work, try to enter the url this way: http://localhost:8888/tree?
And, provide logs from console might help as well.
And one more thing, just to make sure, why you're connecting via port 8889? did you tried to run jupyter by --port command option?

Jupyter notebook webpage is a blank screen

So I bought this fancy shmancy Codecademy Pro subscription to take the data science track, but it appears that it has a rather disappointing lack of documentation for part six of its course. I'm learning about Python right now, and I just downloaded the newest version of Miniconda, which included Python 3.7.2. I'm trying to open a .zip file (called Reggie's Linear Regression.zip) using the command
jupyter notebook
and it works, to some extent; it automatically launches a Chrome page, but it's just blank. I get this error in the Chrome console:
Refused to execute script from '<URL>' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
I want it to show this file: Reggie_Linear_Regression_Skeleton.ipynb. It just opens in my notes app when I click on it in file explorer.
I'm very new to Python and downloading libraries and stuff (this is actually my first time), so even just pointing me to other resources that would help me with this problem would be helpful as I don't even know how to describe the issue. Also, I'm 100% sure I've navigated to the correct folder in the Anaconda prompt.
Thanks so much
The latest version seems to be broken, try to downgrade jupyter. If you install with Anaconda the command is:
conda install -c anaconda notebook=5.7.4
Yeah, looks like the latest version is broken. There is already a pull request but it is not yet merged https://github.com/jupyter/notebook/pull/4468. That is a pretty simple fix, so you can also do it yourself for the time being https://github.com/jupyter/notebook/pull/4468/files
I was facing the same issue.
Downgrade jupyter notebook. If you face the blank page againg, after opening jupyter notebook on broswer press "ctrl+f5" to force restart the page.

Error occurred while creating new notebook in Jupyter Notebook [Permission Denied]

I'm trying to open new notebook in Jupyter Notebook. But it's denies my permission.
Along this problem when I try to open one of directories it's throws an Server Error ,It's occurs in every directory
I'm using conda version 4.4.10 , Windows 7 Professional (if it helps)
Launch anaconda as administrator .
It is not a very good idea to run as admin because you may mess up the whole system by putting commands unless you really know what you are doing(professionally). We generally work with computers under "Admin privilege".
What you need to do is, to make sure you are at "c:\users\your username". If you are not there: type "c: cd\Users\your username".
You are probably at "C:\> " when you try to open "jupyter notebook". Hope that helps!
This error occurred due to window defender .
add jupyter app to allowed app in firewall & protection .
i hope the problem is solved.
if you are going through anaconda prompt. just click on Anaconda navigator and lanch jupyter notebook from here, if your page opened in internet explorer just copy URL and paste in chrome and now re-try to create a new notebook. I hope it will work

Error While Launching jupyter Notebook

I am using Python 3.4 version and when I am trying to open the jupyter Notebook the explorer does open but it displays a link in the explorer like this and after that nothing happens.I am not able to view anything in the explorer
http://localhost:8823/tree?token=27c7f7543497392b736e1f2b74f1d6af93c2065dcbe67c61
What should I do to see the proper jupyter notebook? thanks in advance
You can just retype the url to
http://localhost:8823
If it still show nothing, try to run it on another non empty directory
jupyter notebook --notebook-dir="C:\another directory"
I typed jupyter notebook list on the annaconda prompt , it then gave me a list of all the currently running servers.
i copied one of the servers in the chrome window and it worked

Categories

Resources