Open tobiasBora opened 2 years ago
Note that the ignoreCollisions
seems to fail:
$ cat shell.nix
let
mach-nix = import (builtins.fetchGit {
url = "https://github.com/DavHau/mach-nix";
ref = "refs/tags/3.4.0";
}) {};
in
mach-nix.mkPythonShell {
requirements = ''
numpy
pyzx
jupyter
'';
ignoreCollisions = true;
}
$ nix-shell
these 2 derivations will be built:
/nix/store/brd35m2xw09fqisqlnxkg2c8gigqwz32-python3-3.9.9-env.drv
/nix/store/slhnw3s3lmlbxzllbd8yvarn3s7ag6qm-python3-3.9.9-env.drv
building '/nix/store/brd35m2xw09fqisqlnxkg2c8gigqwz32-python3-3.9.9-env.drv'...
error: collision between `/nix/store/hi7fmaw2mpd40n7k0iwbvb8jya5h68gx-python3.9-jupyter-core-4.9.1/lib/python3.9/site-packages/__pycache__/jupyter.cpython-39.pyc' and `/nix/store/n1ryapkfd3h8zddsa1iqf6icdjv8lbvb-python3.9-jupyter-1.0.0/lib/python3.9/site-packages/__pycache__/jupyter.cpython-39.pyc'
error: builder for '/nix/store/brd35m2xw09fqisqlnxkg2c8gigqwz32-python3-3.9.9-env.drv' failed with exit code 25;
last 1 log lines:
> error: collision between `/nix/store/hi7fmaw2mpd40n7k0iwbvb8jya5h68gx-python3.9-jupyter-core-4.9.1/lib/python3.9/site-packages/__pycache__/jupyter.cpython-39.pyc' and `/nix/store/n1ryapkfd3h8zddsa1iqf6icdjv8lbvb-python3.9-jupyter-1.0.0/lib/python3.9/site-packages/__pycache__/jupyter.cpython-39.pyc'
For full logs, run 'nix log /nix/store/brd35m2xw09fqisqlnxkg2c8gigqwz32-python3-3.9.9-env.drv'.
error: 1 dependencies of derivation '/nix/store/slhnw3s3lmlbxzllbd8yvarn3s7ag6qm-python3-3.9.9-env.drv' failed to build
I found this too - https://jupyter.org/install actually recommends installing via pip install notebook
instead of pip install jupyter
: using notebook
fixed it for me.
or tell mach-nix to remove the duplicate files:
_."jupyter-core".postInstall = ''
rm $out/lib/python*/site-packages/jupyter.py
rm $out/lib/python*/site-packages/__pycache__/jupyter.cpython*.pyc
'';
same for jupyterlab
If I install:
I get an error involving collisions between jupyter and jupyter-core: