Skip to content

Instantly share code, notes, and snippets.

@mdtisdall
Created April 25, 2020 19:22
Show Gist options
  • Save mdtisdall/3446714f86373697609961b8b5d593bb to your computer and use it in GitHub Desktop.
Save mdtisdall/3446714f86373697609961b8b5d593bb to your computer and use it in GitHub Desktop.
Attempt at shell.nix for jupytext
[nix-shell:~/notebook]$ jupyter lab
[W 19:16:02.862 LabApp] Error loading server extension jupytext
Traceback (most recent call last):
File "/nix/store/782wmrsfgkggsh5kbkfjlbmc2psq385h-python3.7-notebook-6.0.1/lib/python3.7/site-packages/notebook/notebookapp.py", line 1615, in init_server_extensions
mod = importlib.import_module(modulename)
File "/nix/store/gpnm7i19lpj8p43mjrdw03d0hjalmskl-python3-3.7.5/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'jupytext'
[W 19:16:02.863 LabApp] JupyterLab server extension not enabled, manually loading...
[I 19:16:03.257 LabApp] JupyterLab extension loaded from /nix/store/i8792z8v30zmhfqz6s4rcw2drwzrcbry-python3.7-jupyterlab-1.2.2/lib/python3.7/site-packages/jupyterlab
[I 19:16:03.257 LabApp] JupyterLab application directory is /nix/store/2hy7c6k55a1dq2dmdw6g95by3i2n5c4i-jupyterlab-extended
[I 19:16:03.640 LabApp] Serving notebooks from local directory: /home/dylan/notebook
[I 19:16:03.641 LabApp] The Jupyter Notebook is running at:
[I 19:16:03.641 LabApp] http://localhost:8888/?token=78cc540b44191c11eb8ff4ec14fc2c2f8def1c8a3b28dd03
[I 19:16:03.641 LabApp] or http://127.0.0.1:8888/?token=78cc540b44191c11eb8ff4ec14fc2c2f8def1c8a3b28dd03
[I 19:16:03.641 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 19:16:03.649 LabApp] No web browser found: could not locate runnable browser.
[C 19:16:03.650 LabApp]
To access the notebook, open this file in a browser:
file:///home/dylan/.local/share/jupyter/runtime/nbserver-883-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=78cc540b44191c11eb8ff4ec14fc2c2f8def1c8a3b28dd03
or http://127.0.0.1:8888/?token=78cc540b44191c11eb8ff4ec14fc2c2f8def1c8a3b28dd03
let
jupyter = import (builtins.fetchGit {
url = https://github.com/tweag/jupyterWith;
rev = "";
}) {};
iPython = jupyter.kernels.iPythonWith {
name = "notebook";
packages = p: with p; [
numpy
matplotlib
jupytext
];
};
jupyterEnvironment =
jupyter.jupyterlabWith {
kernels = [ iPython ];
directory = jupyter.mkDirectoryWith {
extensions = [
"jupyterlab_vim"
];
};
extraPackages = p: [p.python3Packages.jupytext];
};
in
jupyterEnvironment.env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment