Closed andy-bell101 closed 1 month ago
Can you try adding nixpkgs-python.inputs.nixpkgs.follows = "nixpkgs";
?
Oops did mean to do that. I've just added it but I get the same error
I actually had the exact same problem.
However, playing around, it seems to be caused by devenv.inputs.nixpkgs.follows = "nixpkgs";
, though I'm not completely sure (removing that line, and including native dependencies, i.e. pkgs.zlib
, seems to be enough).
This is working for me:
languages.python = {
enable = true;
poetry = {
enable = true;
install = {
enable = true;
groups = ["..."];
allExtras = true;
};
};
libraries = with pkgs; [zlib];
version = "3.11";
};
without the .follow
declaration. I will also test that is not working just adding that.
I have to take it back: now it is just working, even with the .follow
.
Even before, I tried many times to destroy and recreate the environment, but it was still failing.
Now, I checked out an old version (before 1.x) including the lock file, then I reapplied all the changes, and nix flake update
again, and it seems to work...
(I destroyed the whole folder and cloned again, just to be sure)
I have the two lock files, but even with the old one the problem is not present any longer.
So, the advice could be to destroy everything and restart from scratch, but I expected to have done it even before (I even removed the Poetry cache manually). So, I'm not sure any longer how to reproduce it.
@andy-bell101 can you also try be deleting .devenv
first and using the follow?
I've tried both with mixed success. Still experimenting with clearing caches and using different nixpkgs providers
I think it was the compile = true;
that was causing the problem. Removing that seems to have fixed the problem as far as I can tell
Struggling to get Python and Poetry enabled for my package. I've currently got this setup. It looks similar to some of the issues posted already but if I understand it right they should have been fixed by now.
flake.nix
pyproject.toml
But running
python -c "import numpy"
gives me:Is this something obvious that I've got wrong?