ipython / ipython/ipykernel

Kernel not respecting extensions/configuration

Offen
#273 2 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
734
Forks
412
Ø Merge
1 T. 5 Std.
Gemergte PRs (30 T.)
8

Beschreibung

I'm having trouble getting configuration specified to a kernel launched by the notebook server. I've put configuration instructions in both `~/.ipython/profile_default/ipython_kernel_config.py` and `~/.ipython/profile_default/ipython_config.py` (and symlinked `~/.config/ipython` -> `~/.ipython`, just in case) with no success. Contents of the config file are:

```python
c.InteractiveShellApp.extensions = ['dask_extension']
c.InteractiveShellApp.reraise_ipython_extension_failures = True
```

I've proven these files are opened and read by using strace in front of the ipython kernel command (`
strace -o oot.txt ipython kernel -f /run/user/1001/jupyter/.json`), but the extension is not loaded on startup, nor can I find where this configuration even goes.

Inside of the notebook itself, I have a cell:

```python
i=get_ipython()
i.extension_manager.loaded
```

which gives the default extensions:

```python
{'ipywidgets', 'storemagic'}
```

Trying to inspect the configuration (`i.config`) only gives:

```python
{'IPKernelApp': {'connection_file': '/run/user/1001/jupyter/kernel-f6ea9e24-9d6b-4f32-b937-dbbd995cd7ea.json'}}
```

In fact, any object with a config only gives this result.

The extension is loadable with `%load_ext dask_extension` or `i.extension_manager.load_extension('dask_extension')`, so it's not an issue with not being able to find the extension.

What am I missing here? Why does this configuration seems to disappear?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.