DavHau / mach-nix

Create highly reproducible python environments
MIT License
868 stars 106 forks source link

issues with dvc #490

Open rdk31 opened 2 years ago

rdk31 commented 2 years ago

I'm trying to use dvc in mach-nix based development environment with no success. The issue seems to be that dvc uses its own python env and not the mach-nix's which causes scripts ran with it to fail because of the imports but I have no idea how to fix it. I'd be really grateful even for a hacky workaround patching the dvc's package somehow.

reproduction

shell.nix

let
  mach-nix = import (builtins.fetchGit {
    url = "https://github.com/DavHau/mach-nix";
    ref = "refs/tags/3.5.0";
  }) {};
in
mach-nix.mkPythonShell {
  requirements = ''
    numpy
    dvc
  '';
}
TyberiusPrime commented 2 years ago

dvc is in nixpkgs, so you don't need to involve mach-nix (and it's only a minor version out of date right now).

rdk31 commented 2 years ago

I tried using dvc from nixpkgs with the same result.