Python: Merge packages between jupyter & system
parent
d14c11f044
commit
905d0acefe
|
@ -1,13 +1,60 @@
|
||||||
{config, lib, pkgs, ...}: {
|
{config, lib, pkgs, ...}: {
|
||||||
environment.systemPackages = with pkgs; [
|
options = {
|
||||||
(pkgs.python3.withPackages (p: with p; [
|
pythonPackages = lib.mkOption {
|
||||||
|
type = lib.types.anything;
|
||||||
|
default = p: with p; [];
|
||||||
|
example = p: with p; [ numpy scipy ];
|
||||||
|
description = "List of Python Packages installed";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
((pkgs.python3.withPackages config.pythonPackages).override (args: { ignoreCollisions = true; }))
|
||||||
|
];
|
||||||
|
pythonPackages = (p: with p; [
|
||||||
|
# Common Python Libraries
|
||||||
numpy
|
numpy
|
||||||
scipy
|
scipy
|
||||||
|
scikit-learn
|
||||||
pandas
|
pandas
|
||||||
matplotlib
|
matplotlib
|
||||||
tqdm
|
ipympl
|
||||||
|
matplotlib-inline
|
||||||
seaborn
|
seaborn
|
||||||
|
|
||||||
|
# Neural Data Processing Libraries
|
||||||
|
# Temporarily broken?: https://github.com/NixOS/nixpkgs/issues/259812
|
||||||
|
mne-python
|
||||||
|
nibabel
|
||||||
|
# View niftis!
|
||||||
|
ipyniivue
|
||||||
|
neo
|
||||||
|
|
||||||
|
# Neurosimulators
|
||||||
neuronpy
|
neuronpy
|
||||||
]))
|
# nest with MPI is incompatible with Jupyter:
|
||||||
];
|
# https://www.nest-simulator.org/pynest-api/_modules/nest.html
|
||||||
|
# see pynestkernel comments about their workaround
|
||||||
|
(nest.override {
|
||||||
|
withMpi = false;
|
||||||
|
})
|
||||||
|
brian2
|
||||||
|
|
||||||
|
# Machine learning toolkits:
|
||||||
|
tensorflow
|
||||||
|
tensorboard
|
||||||
|
keras
|
||||||
|
edward
|
||||||
|
transformers
|
||||||
|
tflearn
|
||||||
|
torch
|
||||||
|
torchvision
|
||||||
|
torchsde
|
||||||
|
torchmetrics
|
||||||
|
torchio
|
||||||
|
torchdiffeq
|
||||||
|
botorch
|
||||||
|
lion-pytorch
|
||||||
|
]);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,8 @@
|
||||||
|
|
||||||
kernels = {
|
kernels = {
|
||||||
python3 = let
|
python3 = let
|
||||||
env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
|
env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages;
|
||||||
|
(config.pythonPackages pythonPackages) ++ [
|
||||||
# Necessary for use as a kernel
|
# Necessary for use as a kernel
|
||||||
ipykernel
|
ipykernel
|
||||||
ipdb
|
ipdb
|
||||||
|
@ -185,52 +186,8 @@
|
||||||
mediapy
|
mediapy
|
||||||
# Progress bars etc. for in Jupyter/IPython
|
# Progress bars etc. for in Jupyter/IPython
|
||||||
halo
|
halo
|
||||||
|
|
||||||
# Common Python Libraries
|
|
||||||
numpy
|
|
||||||
scipy
|
|
||||||
scikit-learn
|
|
||||||
pandas
|
|
||||||
# Tables displayed in Jupyter: like Pandas Dataframes
|
# Tables displayed in Jupyter: like Pandas Dataframes
|
||||||
ipytablewidgets
|
ipytablewidgets
|
||||||
matplotlib
|
|
||||||
ipympl
|
|
||||||
matplotlib-inline
|
|
||||||
seaborn
|
|
||||||
|
|
||||||
# Neural Data Processing Libraries
|
|
||||||
# Temporarily broken?: https://github.com/NixOS/nixpkgs/issues/259812
|
|
||||||
mne-python
|
|
||||||
nibabel
|
|
||||||
# View niftis!
|
|
||||||
ipyniivue
|
|
||||||
neo
|
|
||||||
|
|
||||||
# Neurosimulators
|
|
||||||
neuronpy
|
|
||||||
# nest with MPI is incompatible with Jupyter:
|
|
||||||
# https://www.nest-simulator.org/pynest-api/_modules/nest.html
|
|
||||||
# see pynestkernel comments about their workaround
|
|
||||||
(nest.override {
|
|
||||||
withMpi = false;
|
|
||||||
})
|
|
||||||
brian2
|
|
||||||
|
|
||||||
# Machine learning toolkits:
|
|
||||||
tensorflow
|
|
||||||
tensorboard
|
|
||||||
keras
|
|
||||||
edward
|
|
||||||
transformers
|
|
||||||
tflearn
|
|
||||||
torch
|
|
||||||
torchvision
|
|
||||||
torchsde
|
|
||||||
torchmetrics
|
|
||||||
torchio
|
|
||||||
torchdiffeq
|
|
||||||
botorch
|
|
||||||
lion-pytorch
|
|
||||||
])).override (args: { ignoreCollisions = true; });
|
])).override (args: { ignoreCollisions = true; });
|
||||||
# Odd collision between tensorboard of torch & tensorflow
|
# Odd collision between tensorboard of torch & tensorflow
|
||||||
# need to resolve later
|
# need to resolve later
|
||||||
|
|
Loading…
Reference in New Issue