Skip to content

Commit

Permalink
added some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhmancs committed Oct 20, 2024
1 parent 2b26042 commit a0b982e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions flake-parts/templates/python/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,19 @@
default = pkgs.mkShell {
venvDir = ".venv";
packages = with pkgs;
[python3]
[
python310
(pkgs.python310.withPackages (ps: [
ps.pip
ps.tkinter
]))
]
# These packages that are packaged with nixpkgs. You can also install packages using pip.
++ (with pkgs.python3Packages; [
pip
# For some reason, if I include pip in this list of packages, the packages installed with pip are not available in the shell environment.
# Instead u get an Error: No module named 'your_module'. It works fine if using pkgs.python3.withPackages (i.e the latest python version).
# For me, I usually need to deal with older python versions, most of the time tenorflow, pytorch, relies on some older packages like distutils
# which are removed from python 3.12+.
++ (with pkgs.python310Packages; [
venvShellHook
ipython
ipykernel # required for jupyter notebooks
Expand Down

0 comments on commit a0b982e

Please sign in to comment.