More often than not I find myself wanting to reuse a python virtual environment
with packages I use frequently already installed. For instance, I might want to
do some quick calculations and plotting in a scratch directory with numpy,
scipy, pandas, matplotlib, etc. With my current python workflow, it is
easy to lie on a Procrustean bed and create a new virtual environment in each
and every new scratch directory. Alternatively, one could create a base virtual
environment, install the aforementioned packages and source the virtual
environment from where ever it is located and carry on with one's calculations
and plots.
This latter option is slightly less cumbersome than the former, but it still
requires you to know where the base virtual environment is located. With
poetry and fzf we can lift the mental overhead of having to knowing where
the base virtual environment is. To this end, I wrote a smol script that uses
fzf to source a poetry virtual environment from anywhere.
From here you can dump this into $HOME/.local/bin and/or bind the execution
of the script to a shell keyboard shortcut.