dckc / madmode-blog

my tinkering notebook (blog)
https://www.madmode.com
0 stars 2 forks source link

install jupyter, pandas with nix flake? #171

Open dckc opened 1 year ago

dckc commented 1 year ago

I'm picking up work on Syncing iPhoto with flickr, so I'd like to re-animate photo-flickr-explore.ipynb.

After good luck with nix for ruby for Web-iPhoto, I thought I'd try nix for jupyter.

suggests a flake, but when I try it, I get a mysterious:

~/projects/madmode-blog]$ nix develop
warning: Git tree '/home/connolly/projects/madmode-blog' is dirty
error: getting status of '/nix/store/1vpl74zqrff5507fi1c2wsnqkvk1l61z-source/flake.nix': No such file or directory

nix-shell

so let's go with...

~/projects/madmode-blog$ cat ./nix-shell.sh 
nix-shell -p "python3.withPackages(ps: with ps; [ipython jupyter numpy pandas])"

copying path '/nix/store/fd2jwmffn2fczivwbi61i8fc584w7qsa-python3.10-jupyter-1.0.0' from 'https://cache.nixos.org'...
building '/nix/store/c76s2ikk0q0f7pq9j7gdb62khi72b2rp-builder.pl.drv'...
building '/nix/store/h2qd3gjfw7p1by2k28gmwl38gdcxpifx-python3-3.10.8-env.drv'...
created 594 symlinks in user environment

[nix-shell:~/projects/madmode-blog]$ jupyter notebook
[I 20:43:41.728 NotebookApp] Serving notebooks from local directory: /home/connolly/projects/madmode-blog
...

tried and true: miniconda

Somehow I forgot that was working and started down the old road too...

https://docs.conda.io/en/latest/miniconda.html#linux-installers https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh Miniconda3 Linux 64-bit 73.1 MiB 78f39f9bae971ec1ae7969f0516017f2413f17796670f7040725dd83fcff5689

dckc commented 1 year ago

Nix flakes are still experimental?

One part of that flake that gives me pause:

    flake-utils = {
      url = "github:numtide/flake-utils";
    };

yup:

Warning This program is experimental and its interface is subject to change. -- nix flake docs

dckc commented 1 year ago

Nixos: how to install deps in jupyter notebook? - Unix & Linux Stack Exchange

has some stuff that looks good.