I recently got a new Macbook Pro (Sierra 10.12.3) and wanted to install anaconda. I downloaded the graphical installer from the conda website and ran it; I mistakenly selected the option to install in root (ie not just for a local user). The installation went fine and python ran without a hitch. However, when running jupyter notebook I was told "Permission denied". sudo jupyter notebook worked.
Previously, I had been running an up-to-date conda and jupyter notebook on my previous laptop with Yosemite, and I had never had to sudo to run the notebook. As far as I've been told, letting programs (even trustworthy ones) run with root access should be avoided at all costs, so I wanted to try to fix this.
I used anaconda-clean and then removed the conda directory, and re-installed it for the local user (so now it sits in ~/anaconda/ and not //anaconda/). All conda commands now work without sudo except the jupyter notebook, which still requires sudo jupyter notebook or else it throws the same "Permission denied" error.
How do I solve this and enable the jupyter notebook to start up without root access? I do not know if this is a related issue, but the notebook starts up in Safari despite my default system browser being set to Chrome. Any help will be appreciated!
Got it working; the key is in the ownership of the ~/Library/Jupyter folder. As mentioned in the comments, the anaconda-clean utility deletes all the config files in the home/root folder, and then the removal of anaconda involves "simply" deleting the //anaconda or ~/anaconda folders depending on which install was done.
However, it appears that the Jupyter Notebook creates the ~/Library/Jupyter folder in the home directory, which I obviously missed! Recursive chown does the trick.
Incidentally, this also solves the browser problem, and the notebook starts up in Chrome as expected. I suspect this may have had something to do with sudo jupyter notebook starting up its own browser as root.
Related
I have been trying to activate jupyter notebooks in a kedro context for over 24 hours now and I receive the same error all the time. I have searched around and no one seems to be able to solve this problem. I have created a jupyter_notebook_config.json as recommended by some and deleted it as recommended by others and there is no change.
I have installed ipython and run $python3 -m ipykernel install --user --name=myvenv
this successfully installed kernelspec within my venv but still when i run
kedro jupyter notebook
i get the following error
[C 08:50:49.028 NotebookApp] Bad config encountered during initialization: The 'kernel_spec_manager_class' trait of <notebook.notebookapp.NotebookApp object at 0x7fdef3120a90> instance must be a type, but 'kedro.framework.cli.jupyter.SingleKernelSpecManager' could not be imported
Can anyone direct me on how to approach this as it is preventing me from conducting my work in jupyter.
note that kedro jupyter and kedro jupyter lab and kedro ipython work just fine. The issue seems limited to notebook
I have tried
https://github.com/kedro-org/kedro/issues/184
https://github.com/jupyter/notebook/issues/2875
Running jupyter lab in kedro project in vscode under windows not possible
none of these resources helped. Any guidance is appreciated
After some time on this. My manager asked to run jupyter --version turns out that notebook was not installed.
while not a solution for everyone, it warrants a check to ensure that notebook is installed. Though this does not explain how i was able to access and work in notebook prior to noticing this issue
After I pip install jupyterlab, I can't open it since it gets stuck in an infinite loop in safari!. I want to change my browser to chrome and tried to do it through a solution offered here but I can not find the #c.NotebookApp.browser = '' to change it.
Do you have any suggestion on how to solve this weird infinite problem in safari?
I finally realized that the best work around this is to install a virtual environment and run jupyter lab there,
Simply run the followings:
1- pipenv install jupyterlab
2- pipenv shell
3- jupyter lab
I used Anaconda on Windows with Python 3.7.
I can run 'jupyter notebook' under root (base) environment and all the notebook files show up on the web browser.
However, when I call 'jupyter notebook' on my virtual environment named 'tensorflow_env'. It shows an empty page on the web browser.
Note that I have installed both jupyter and nb_conda on my tensorflow_env virtual environment.
Any thought? Thank you very much.
I had a similar problem and it turned out to be an issue with notebook 5.7.6, downgrading to 5.7.4 fixed the issue for me:
conda install notebook=5.7.4
to see changes remember to clear your cache (ctrl+shift+r)
Jupyter notebook is not opening kernels in my current environment. Running which jupyter in command line indicates the proper directory within the environment, my environment has nb_conda installed using conda_forge and also has ipykernel installed, I just updated conda to version 4.5.12. When I open jupyter notebook I am able to see a conda tab and my current environment shows up there but when I try to create a new notebook or change kernel within a notebook my current environment does not show up. When I run jupyter notebook in iterm (I am using zsh) I receive a message [nb_conda_kernels] enabled, 2 kernels found which is a problem because I have three kernels (root, an old environment, my current environment).
I've tried looking through different help forums on github and following the readme but I still haven't managed to get it to work. Any help would appreciated!
Maybe this does not work at all, because its a Mac, but maybe there is a way to open a jupyter notebook on a Mac? I tried the following command
jupyter notebook Manager.ipynb
and I got an error
Error executing Jupyter command 'notebook': [Errno 2] No such file or directory. Same with out 'notebook':
jupyter Manager.ipynb
Error executing Jupyter command 'Manager.ipynb': [Errno 2] No such file or directory
There is a file named Manager.ipynb in the current folder.
So is there a way to open that notebook on a Mac? Do I have to install some crazy stuff in order to make it work?
The problem I was facing was either a mis-installation of jupyter, or there is another application on Macs with the same name. However, (re)install it with this command
pip install --user jupyter
(a global pip install does not seem to work because of some Mac-nonsense, see here), and then it might work. Or install it in a virtual environment altogether.
This may or may not be helpful for you, but it's something to know and it's how I access the notebook on my mac.
When I installed Julia, it just came with the command line, I never got the icon to open the notebook or anything of that nature. I had too much trouble trying to install it so I just gave up on getting the icon or a direct link, but if you get Julia installed, you should be able to access the terminal version by entering
$ Julia
Or clicking on the Julia terminal icon, which will give you this:
And then you can just open the notebook by running the following:
using IJulia
IJulia.notebook()
Also if you're just starting with Julia don't forget you may have to add the package manager by typing using Pkg or adding it directly to your code.
This should open it in your default browser (there is no option to open it in a different browser or window). I'm not sure if this is useful but it's an option for those who have trouble installing it like I did.