My environment:
Windows 10 Professional Python 3.7.2 virtualenv 16.4.3
I created a new virtual environment with D:\Python37\Scripts\virualenv env
Then I activated the virtual environment with env\Scripts\activate
Then I installed jupyter with pip install --upgrade jupyter
Finally, I started jupyter with jupyter notebook
Everything starts up fine, and I create a new Python 3 notebook. Unfortunately, the notebook never connects to the server. I get the following error message in powershell
Replacing stale connection: (token)
In the browser, I get the following error message:
"A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration."
My two prior virtual environments (with Jupyter) work fine. I've deleted .ipython, .jupyter, AppData\Roaming\jupyter, without any luck.
I've cleared cookies from my browser and have tried a different browser. Nothing works.
I've created two other virtual environments before, and both of those still work.
All jupyter notebooks in the two working environments start up as untrusted, whereas the new environment starts up as trusted. I'm guessing that I clicked on something and now the notebook is looking to start up in a trusted fashion - which may require HTTPS.
Where do I look to fix this problem?
Try disabling any browser extensions and/or any Jupyter extensions you have installed. Some internet security software can interfere with Jupyter. If you have security software, try turning it off temporarily, and look in the settings for a more long-term solution.
Connect to a Jupyter server using OAuth authenticationicon on the toolbar of the Workspace tool window. Select Connect by URL and enter the target Jupyter server address in the Server URL field. Click the Link to the token page link. You will be prompted to login into GitHub.
Restart the kernel, run the cells again and let me know if the output shows up.
you can go to chrome and type, http://{your ip address}:8888 to access the same jupyter notebook. Congratulations!
This appears to be a tornado issue. I found clues here.
I looked at the version of tornado (from the above links) in an environment that was working. It turns out that the version was 5.1.1.
I looked at the version of tornado in an environment that was NOT working. It turns out that the version was 6.0.
I downgraded the version of tornado in my non-working environment to 5.1.1 with the following command.
pip install --upgrade tornado==5.1.1
And now the non-working environment works!
Anaconda is pretty good at handling any dependencies.I just tried this using Anaconda in the terminal:
# see current envs
conda info -e
# make new environment, feel free to add your version of python with python=3.7 handle
conda create -n test
activate test
conda list #This should appear empty
conda install jupyter #y to install everything.
jupyter notebook #launch jupyter notebook
Mine comes up as 'trusted'. The method above may not necessarily be the most minimalist way of doing things, but at least nothing breaks and you're up in running in no time. I'm using conda version: 4.6.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With