It's possible to control/specify the Python environment via specific environment.yml
and then using conda
to create/activate it. However, for some projects, I might want to have a finer-grained control of environments in which Python code is executed.
For example, if I have 5 notebooks that have different (and potentially conflicting) dependencies. One way is to have multiple environment file definitions, which can also be controlled via nb_conda_kernels
during interactive sessions, but is there a more elegant way to achieve this? (something that will avoid creation of multiple environment files)
There is a decorator in metaflow
(https://docs.metaflow.org/metaflow/dependencies) that allows specifying dependencies for individual steps in the pipeline, however is there a way to achieve a similar result without metaflow
?