Jump to content

Python: Difference between revisions

m
extraLibPackages is not used in python-shell.nix. python-shell.nix re-import nixpkgs.
(Poetry fix was not working... it should work now :))
m (extraLibPackages is not used in python-shell.nix. python-shell.nix re-import nixpkgs.)
 
Line 95: Line 95:


let
let
   myPython = pkgs.python311;
  # Choose your python version
   pythonPackages = pkgs.python311Packages;
   myPython = pkgs.python3;
   pythonPackages = pkgs.python3Packages;


   pythonWithPkgs = myPython.withPackages (pythonPkgs: with pythonPkgs; [
   pythonWithPkgs = myPython.withPackages (pythonPkgs: with pythonPkgs; [
Line 113: Line 114:
   ]);
   ]);


   extraBuildInputs = with pkgs; [
   extraBuildInputs = with pythonPackages; [
     # this list contains packages that you want to be available at runtime and might not be able to be installed properly via pip
     # this list contains packages that you want to be available at runtime and might not be able to be installed properly via pip
     # pythonPackages.pandas
     # pandas
     # pythonPackages.requests
     # requests
   ];
   ] ++ (with pkgs; [
    #
  ]);
in
in
import ./python-shell.nix {  
import ./python-shell.nix {
    extraBuildInputs=extraBuildInputs;  
  extraBuildInputs = extraBuildInputs;
    extraLibPackages=extraLibPackages;  
  # extraLibPackages = extraLibPackages;
    myPython=myPython;
  myPython = myPython;
    pythonWithPkgs=pythonWithPkgs;
  pythonWithPkgs = pythonWithPkgs;
  pkgs = pkgs;
}
}
</syntaxhighlight>
</syntaxhighlight>