DavHau / mach-nix

Create highly reproducible python environments
MIT License
858 stars 105 forks source link

Mach-nix can't find packages that definitely exist #355

Open JonathanReeve opened 2 years ago

JonathanReeve commented 2 years ago

scikitlearn is a very common Python package, yet mach-nix can't find it:

The Package 'scikitlearn' is not available from any of the selected providers {'nixpkgs', 'sdist', 'wheel'}
 for the selected python version

Yet it's definitely in nixpkgs, and also in PyPi:

$ nix search nixpkgs scikitlearn
* legacyPackages.x86_64-linux.python38Packages.scikitlearn (0.24.1)
  A set of python modules for machine learning and data mining

* legacyPackages.x86_64-linux.python39Packages.scikitlearn (0.24.1)
  A set of python modules for machine learning and data mining

To reproduce, make a requirements.nix file with scikitlearn in it, then run: mach-nix env ./env -r requirements.txt and nix-shell ./env.

InLaw commented 2 years ago

pkg name in pypi is scikit-learn

nix-shell -p nixFlakes --run "nix run mach-nix#gen.python.ipython.scikit-learn --show-trace "

The naming convention changed with the default provider not anymore being nixpkgs / conda integration