News for hackers. Stuff that matters.
Re:My Python Development Environment, 2020 Edition by shpx on Tuesday November 12, 2019 @05:55AM (#21513144)
How do you specify Python dependencies and their versions in Nix?
Re:My Python Development Environment, 2020 Edition by soraminazuki on Tuesday November 12, 2019 @06:44PM (#21519497)
A quick and dirty way would be:

$ nix run "(import <nixpkgs> {}).python37.withPackages([ pandas statsmodels ])"

This would drop you into a shell with Python 3.7, pandas, and statsmodels installed.

For more complex use cases, you should specify your dependencies in a shell.nix file or write your own nix package.

Re:My Python Development Environment, 2020 Edition by whateveracct on Wednesday November 13, 2019 @03:13AM (#21521994)
And then to expand, if you wish to pin one of those packages to a specific rev, the easiest way is to create an "overlay" (it's a Nix design pattern) that you apply to nixpkgs to override whatever version is in your nixpkgs version.