Ipython Notebook: where is jupyter_notebook_config.py in Mac?
Asked Answered
D

4

24

I just started using a Mac, so please forgive me if this sounds too naive.

I'm trying to install Interactive Parallel. From https://github.com/ipython/ipyparallel, it says I need to find jupyter_notebook_config.py.

I've already installed python and related packages with Anaconda, and I can use the ipython notebook. But when I search with spotlight for jupyter_notebook_config.py, I just can't find this file:

enter image description here

So, where can I find this file?

UPDATE: this is my home folder:

enter image description here

There is only anaconda.

Depicture answered 17/9, 2015 at 8:39 Comment(0)
C
35

Look in your home directory for a .jupyter folder. It should contain the file according to the docs:

The notebook web server can also be configured using Jupyter profiles and configuration files. The Notebook web server configuration options are set in a file named jupyter_notebook_config.py in your Jupyter directory, which itself is usually .jupyter in your home directory.

If the .jupyter folder does not contain a jupyter_notebook_config.py file, you need to generate it with jupyter notebook --generate-config. For Jupyter lab, you use the command jupyter lab --generate-config to generate the jupyter_lab_config.py file.

Combined answered 17/9, 2015 at 8:57 Comment(4)
I only find anaconda. Is .jupyter hidden? How can I disply it?Depicture
@cqcn1991 Yes the dot means, that the folder is hidden. Here is an article explaining how to show hidden files in MacOS X.Combined
Ok, my fault. I should generate it first using jupyter notebook --generate-configDepicture
@cqcn1991 Lol thanks, your own comment helped me much more than anything I've found on the internet.Ado
L
17

try this command:

jupyter --paths

http://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html

Libertinism answered 13/6, 2018 at 12:19 Comment(1)
Excellent, this worked for me; while .jupyter folder did not have the jupyter_notebook_config.py file, I did find it in one of the paths listed hereEndres
J
1

As cqcn1991 said, you first need to generate the config file.

After drilling down from my home path here's where I found the executable to generate the config file and how I generated it.

I also had to reference the jupyter executable file with ./ as I apparently don't have that in my path just yet but will add it.

cd /Users/myMac/anaconda2/bin
 ./jupyter notebook --generate-config
Writing default config to: /Users/myMac/.jupyter/jupyter_notebook_config.py

Then I did find the config file in my home directory.

Jessamyn answered 30/11, 2017 at 11:25 Comment(0)
A
0

Should you Uninstalling Anaconda for that :

$ herm -rf ~/anaconda3re

$ conda install anaconda-clean

$ anaconda-clean

$ anaconda-clean --yes

$ export PATH="/Users/jsmith/anaconda3/bin:$PATH"

That's Solve my problem On mac ; For more information visite : https://docs.anaconda.com/anaconda/install/uninstall/

Alfredoalfresco answered 26/10, 2020 at 23:6 Comment(1)
Doesn't look like a valid answer.Nystatin

© 2022 - 2024 — McMap. All rights reserved.