-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best way to add sys dependencies of Python libraries? #1228
Comments
Aha, I found https://github.com/cachix/devenv/blob/python-rewrite/tests/python-native-libs/devenv.nix Ok, nevermind. Though could the docs be updated to specify that case? A lot of python libs need that kind of setup, if that's the recommended way to go it should probably be made explicit. |
@YPares, are you on the |
@sandydoo I'm using devenv 1.0.5 (installed from nixpkgs-unstable). EDIT: I reinstalled it directly from this repo's flake ( |
@YPares, have you run Could you please post the error you're getting and instructions how to repro it? I did the following and it seems to work (I'm not familiar with spacy though): devenv.nix { pkgs, ... }:
{
packages = [ pkgs.zlib pkgs.stdenv ];
languages.python.enable = true;
languages.python.version = "3.11";
languages.python.venv.enable = true;
languages.python.venv.requirements = ./requirements.txt;
} python -m spacy download en_core_web_sm import spacy
nlp = spacy.load("en_core_web_sm")
doc = nlp("This is a sentence.")
print([(w.text, w.pos_) for w in doc])
|
@sandydoo Ok, I think I get the problem. I was using:
as my nixpkgs flake source. With it the The exact error was:
|
I'm making a devenv setup to provide python and spaCy (which depends on zlib and libstdc++). I ended up with:
Is that the recommended way to do so? (Ideally I'd like nix itself to provide spaCy, so it and its dependencies are locked along with the rest of the config, but adding it to packages resulted in build errors)
The text was updated successfully, but these errors were encountered: