Run python code in a virtual environment to isolate specific dependencies from system (or other user or application) changes.
On Rhea (linux server), pyenv manages python versions and a plugin pyenv virtualenv manages virtual environments within those versions. Alternatives (not on rhea) include poetry and pipx.
For Preprocess Functional (Hallquist pipeline)'s 4dslicemotion, we need nipy. but nipy wont install on system python.
pyenv virtualenv 3.10.12 preproc-3.10 # nipy doesn't install on 3.11 # pyenv versions |grep envs # points to /opt/ni_tools/pyenv/versions/3.10.12/envs/preproc-3.10 source /opt/ni_tools/pyenv/versions/3.10.12/envs/preproc-3.10/bin/activate pip install git+https://github.com/nipy/nipy pip install transforms3d preprocessFunctional -check_dependencies
fmriprep can be run in a container or outside. to keep it's dependencies isolated:
pyenv virtualenv 3.11.4 fmrirep-py3.11 pyenv local fmrirep-py3.11 pip install fmriprep