matplotlib I'm on NixOS. How can I install packages on PyPy?

5hcedyr0  于 2023-02-23  发布在  其他
关注(0)|答案(1)|浏览(163)

I'm on NixOS 22.11, and I'm trying to install pypy3 along with packages. In particular, I'm modifying /etc/nixos/configuration.nix .
The plain CPython is fine to install:

environment.systemPackages = with pkgs; [
  (python3.withPackages (p: with p; [
    scipy
    matplotlib
    torch
  ]))
];

But doing this for PyPy is a pain. I tried this:

environment.systemPackages = with pkgs; [
  (pypy3.withPackages (p: with p; [
    matplotlib
  ]))
];

And sudo nixos-rebuild switch complained about tkinter-7.3.9 being not supported on PyPy.
I also tried this:

environment.systemPackages = with pkgs; [
  (pypy3.withPackages (p: with p; [
    torch
  ]))
];

And sudo nixos-rebuild switch complained about protobuf-4.21.8 being not supported on PyPy.
Does this mean I cannot install these anyway, or is it just a dependency issue? I thought NixOS was supposed to solve all dependency issues.

bvjveswy

bvjveswy1#

如果您没有在系统范围内安装python包的特定要求,请查看Mech-nix以安装python包,它也是可复制的。

相关问题