when I am launching a jupyter notebook from the terminal on my ubuntu 18.04, the signal desktop messenger app launches as well. Does anyone encountered this issue and knows how to solve it? Thanks
I have the same issue here (Ubuntu 18.04) and I discovered that the default application to run *.html-Files was also changed to Signal Desktop App. After changing the default application for *.html backwards to Firefox jupyter notebook launches already in the browser.
I've found a way to do this that is (possibly) more directly related to Jupyter. You can create a Jupyter config file and change the browser preference to whatever you like. Type:
jupyter notebook --generate-config
on the command line. It will tell you where the config file was created (probably $HOME/.jupyter/jupyter_notebook_config.py). Open the config file and look for the following line:
#c.NotebookApp.browser = ''
you can uncomment it and change it to include your desired web browser. For example this is how I changed it to firefox:
c.NotebookApp.browser = '/usr/lib/firefox/firefox'
Save the file, exit and try again.
This worked for me on Ubuntu 16.04.6 (LTS) and I had a similar problem but this answer didn't work for me. The situation I found myself in was that jupyter launched Firefox correctly in a normal environment but it launched the wrong application when I was in a directory that used a different python version which was being controlled via pyenv. I was launching the notebook like this: pipenv run jupyter lab. For completeness it was launching Signal for me too and - no - I don't really understand why. I found help in the thread connected to this issue on the jupyter/notebook Github page.
Related
when i open anaconda prompt or use "conda" in cmd its says access is denied and window prompt
"
this app can't run on your pc to find a version for your pc check with the software publisher"
and right now i also cant open anaconda navigator as well
Noted: I have been using the anaconda for a while with no problem before, however i miss-clicked sign out option instead of shutdown from window10 and it seem that the privacy is changed somehow, so far i have try changing environment variable and manage app execution alias but both of them did not solve the issue. Please share your solution if you experience this before thank you
The solution I found for it is the worst possible: I simply reinstalled Anaconda.
You can also try just getting conda.exe from the compiled source and replace it on Scripts folder instead of reinstalling it.
I recently bought a new M1 Pro Macbook with macOS Monterey. Migrated all my stuff from my previous Macbook Air over to it.
I opened my Jupyter Notebook via Anaconda but now, it cannot detect my Desktop files and folders (the Desktop folders are on the extreme right of the screenshot):
I have also went to System Preferences -> Security & Privacy -> Privacy -> Files and Folders to check on the access and permissions, but nothing seems amiss:
Attaching the Jupyter terminal boot-up here as well just for reference:
Can anyone assist? Thank you!
Jupyter can't cd outside of your Users/user path. However, you can change that folder in the jupyter_notebook_config.py. Look for the c.NotebookApp.notebook_dir entry to point to the desired working directory. You can create this config file from your shell via
jupyter notebook --generate-config
Small configuration is required to view these files on jupyter notebook.
Get the path of jupyter_notebook_config.py file.
Below mentioned command can be used to find it -
jupyter notebook --generate-config
open the file and search for c.NotebookApp.notebook_dir
this might be configured to default value i.e. ''
Reconfigure it and update path of directory contain code files,
like -
c.NotebookApp.notebook_dir = /Volumes/Technical/Python
I have recently reset my laptop and installed Anaconda in it, and I tried to open JupyterLab but it gives me error
Error executing Jupyter command 'lab': [WinError 5] Access is denied
but it works fine when I try to open JUPYTER NOTEBOOK or try to open JUPYTER LAB with Anaconda as administrator.
I reinstalled Anaconda, and still it gives me the same error. Also it gives me the same error when I try to open JUPYTER LAB from Anaconda Navigator. Before resting my laptop it works fine for me, but now it's not. I tried to search my query on the web before asking here, but I did not get my answer.
I want to run JUPYTER LAB with normal Anaconda prompt
Additional details
My Anaconda is installed in C:\ProgramData (by default).
I didn't check the box “add to path” while installing Anaconda.
You can just run it with Python:
python -m jupyterlab
This should work from an Anaconda Prompt or even the command prompt (if it uses the Python in Anaconda). It does not require admin rights.
Workaround:
open anaconda navigator
click on the jupyter lab settings option and then remove it
Now open your anaconda prompt and type the following command: conda install -c conda-forge jupyterlab
now try to open it.
Proper solution:
If you have installed Anaconda for all users then you will face this issue (thanks to Alok Rajasukumaran, who pointed out this). The best way to solve this problem would be to reinstall this for only the current user.
But if you have a requirement to install for all users, then you can follow these steps:
run the terminal as an administrator
type jupyter lab
Optional (Automating launching jupyter lab with shortcut)
If you want to automate these steps, then you can create a batch file and assign a keyboard shortcut to it. Steps are as follows:
open notepad and write "jupyter lab" and save it as a .bat file
right-click on that file and click on create shortcut.
now open the properties of created shortcut file and in the "shortcut-key" section type any combination of keys you want to set
shortcut.
click on "Advanced" and select "Run as administrator"
Now you can initiate jupyter lab directly by typing your shortcut key and giving "yes" permission to the prompt.
Try to execute as an admin. Problem solved.
This solution is unsafe. When you execute a program with Admin this program has full permissions over the system.
The good solution is to create a new environment with your current system user (not root/admin). Activate this new environment and it would works
Usually, you don't have error in opening jupyter notebook command.
I usually type the jupyter notebook in the path bar in the explorer to open the notebook from that path directly — but as we are having an error in jupyter lab, I was only able to open jupyter notebook from there.
The solution for that is:
Just type jupyter notebook as usual in the command prompt or the path bar in explorer.
As soon as the browser opens automatically, change the URL from:
http://localhost:8888/tree to → http://localhost:8888/lab
Yes, just a one word change. tree → lab and...
Whoo! The jupyter lab is open right there you want it to be!
This is a problem that I see happening for Anaconda 3 installs for all users on Windows. Default (for single user) install seems fine. The permissions are somehow messed up during install. The solution I found is: explorer > right click anaconda3 folder > properties > security > advanced > change permissions > check "replace all child permission entries..." > OK.
This will take a while. After that uninstalling and reinstalling Jupyter Lab worked well.
The problem I had is that it installed the application in users/<your username>/anaconda3/.
To solve this I simply manually moved the folder with its contents to c:/program files/.
Avoid running as Admin due to security concerns. The fastest way is to create a virtual environment and install it there. This is what I did and it did not require any reinstallation of Anaconda or running it as Admin.
in anaconda prompt:
conda create -n myenv python=3.9
conda activate myenv
conda install -c conda-forge jupyterlab
jupyter lab
the last line will launch the jupyter lab.
I want to emphasize what was written only as a comment, because it is easier to find it as an answer than to browse all comments:
If you are using Windows and installed it for all users, you will get this error.
The easiest way is to reinstall Anaconda only for you.
Note: You may uninstall your previous (unsuccessful) installation (for all users) before reinstalling it for only one user (you). But it is possible to do it later, too.
What I did is to create a new environment in Anaconda Navigator. I had the default environment which was root, so I could launch applications only as root.
In the Anaconda Navigator Home screen click on Environments -> Create. Here is the guide to create a new environment https://docs.anaconda.com/anaconda/navigator/tutorials/manage-environments/
On my Windows PC, i have anaconda installed and when I open a jupyter notebook, it opens up in internet explorer, but I would like to use Chrome instead. Does anyone know how to achieve this?
If you haven't already, create a notebook config file by running
jupyter notebook --generate-config
Then, edit the file jupyter_notebook_config.py found in the .jupyter folder of your home directory.
You need to change the line # c.NotebookApp.browser = '' to c.NotebookApp.browser = 'C:/path/to/your/chrome.exe %s'
On windows 10, Chrome should be located C:/Program Files (x86)/Google/Chrome/Application/chrome.exe but check on your system to be sure.
Just make chrome as a default browser and launch the jupyter . It will work
To Make Google chrome a default browser , follow steps
Click on Customize and Control Google chrome (The vertical three dots on the Upper right corner of your google chrome browser)
Click on Settings and scroll down to Default browser.
Change the value of the default browser to Google Chrome by clicking on whatever your default browser is there and selecting Google Chrome.
Note: In windows 10, you will be redirected to Default apps under your computer's Settings. Please scroll down to Web browser and Select Google Chrome. If promted, Click on OK else just close the settings tab and return to your command or anaconda prompt and type jupyter notebook as usual. A new jupyter notebook tab should open in Google Chrome now.
For those who still have trouble launching Chrome automatically from cmd, try replacing
# c.NotebookApp.browser =''
in the file jupyter_notebook_config.py with
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser = 'chrome'
or the appropriate location, there shouldn't be need to install anything via pip.
Ref: https://support.anaconda.com/customer/en/portal/articles/2925919-change-default-browser-in-jupyter-notebook
Create and edit the jupyter notebook config file with the following steps:
Launch Anaconda Prompt
Type jupyter notebook --generate-config
Type notepad path_to_file/jupyter_notebook_config.py to open it (change path_to_file)
Modify #c.NotebookApp.browser = '' to c.NotebookApp.browser = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
Save the file and close it
Jupyter notebook will now use Chrome.
EDIT
In Windows 10 I had to type
notepad .jupyter/jupyter_notebook_config.py
And substitute the line with
c.NotebookApp.browser = 'C:/Program Files/Google/Chrome/Application/chrome.exe %s'
step1: Go to search menu of windows and type default app.
step 2: go to WEB BROWSER title and change it to Google Chrome.
step3: Go to search menu of windows and type jupyter notebook
This will open the jupyter notebook in Google Chrome
Run the jupyter notebook --generate-config command on the anaconda prompt.
Then edit the jupyter_notebook_config.py file.
Find the c.NotebookApp.Browser like this:
c.NotebookApp.browser = 'c:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
Works on mine.
Take any html file on your computer and set the default browser to open html files to chrome. This will automatically open jupyter notebook with chrome. Worked for me.
For windows set the default browser to open html files to Chrome. Configuration > Default Apps > Default Apps by File Type. Worked for me.
I found an easier solution that may help beginners to coding.
go to
C:\Users\'-your user-'\AppData\Roaming\jupyter\runtime
and find a file named
nbserver-6176-open.html
then
Right-click > open with > Choose default program...
Here, what ever you choose would be saved on your Windows to open all HTML files; therefore when you run Jupyter notebook, it would open in the program you want.
You don't have to change anything in the jupyter config code, you just have to make Chrome as your default browser in the setting. Jupyter opens whichever is the default.
For some reason Louise's answer didn't work for me I had to:
-Open anaconda prompt and generate the config file for Jupyter: jupyter notebook --generate-config
-Open the newly created config file at: C:\Users\builder\.juptyer\jupyter_notebook_config.py
-Add the following to the file:
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser(r'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser = 'chrome'
I just followed 2 steps and everythings working as expected
step-1
set chrome executable path environment varibale, in my case it is(you can test it in cmd by typing chrome and enter, it will open your chrome browser if path set properly):-
C:\Program Files\Google\Chrome\Application\chrome.exe
step-2 just run below command and you are good to go
jupyter notebook --browser chrome
See response on this thread that has worked for me:
https://stackoverflow.com/a/62275293/11141700
NOTE - Additional STEP 3 that has made the difference for me compared to similar approaches suggested here
In short:
Step 1 - Generate config for Jupyter Notebook:
jupyter notebook --generate-config
Step 2 - Edit the config file using "nano" or other editor
The config fileshould be under your home directory under ".jupyter" folder:
~/.jupyter/jupyter_notebook_config.py
Step 3 - Disable launching browser by redirecting file
First comment out the line, then change True to False:
c.NotebookApp.use_redirect_file = False
Step 4 - add a line to your .bashrc file to set the BROWSER path
export BROWSER='/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'
For me it was Chrome under my Windows Program File. Otherwise any linux installation under WSL doesn't have a native browser to launch, so need to set it to the Windows executable.
Step 5 - restart .bashrc
source .bashrc
In the windows when we open jupyter notebook in command prompt we can see the instructions in first 10 lines in that there is one instruction- "to open notebook, open this file in browser file://C:/Users/{username}/appdata/roaming/jupyetr/runtime/nbserver-xywz-open.html " , open this html with browser of your choice.
If you tried all these "solutions" and still doesn't work, try to open the url over HTTP (not HTTPS <-- the real problem with chrome) and using an Incognito window (press Ctrl + Shift + N on Chrome)
This worked for me. Hope it helps
I just set chrome as my default browser and jupyter launches in Chrome now.
However, we have also the following approach, but it did not work for me:
"CONDA version 4.7.5 and jupyter 6.0.0. - Windows 10"
1) Open Anaconda and launch your environment in terminal
2) Create config file and open file in notepad
3) Modify line of NotebookApp with chrome and save modification
4) Launch Jupyter
:( ... but it still launches in Mozilla.
This is more like a beginner's question.. So please bear..
I started using the google app launcher - python, I created a new application with port 8080. When I run the default Hello, World application (which i noticed from main.py)
I always keep hitting the 500 error - Internal server.
I find this kind of strange error in the logs:- ImportError: No module named urllib.
I'm stuck.. Can you please help trouble shoot.
Thanks!
P.S: I run a snow leopard with a python 2.6.1 pre-installed, hence I didn't install a new package.
I resolved this by the following:
Installed python 2.7.3 from the python site.
Adding the python path /usr/local/bin/python2.7 in the google app launcher preferences.
Hitting the return key after typing the path and then closing the preferences.
Restarting the application and tadaaa.. :)
I've seen this too -- in fact, one of my OS X boxes still has this problem sometimes. I believe there is probably something in your .profile or site-packages that causes this, but it's difficult to debug. You could try installing Python 2.7 from python.org and use that. (Sorry for being so vague.)