Python, Conda and Pip: Suggested Best Practices

Goal: Bringing together concepts from the workshop, list suggested best practices.


Suggested Best Practices

  • If not using Miniconda, use a module version of Python. Do not rely on a the general System/compute node version.

  • Install packages within the Conda environment. Do not rely or try and manage packages installed under ~/./local/lib/pythonX.Y.

  • Be aware if relying on what is under ~/./local/lib/pythonX.Y then updates to packages could effect other Conda environments that use them.

  • After creating/activating an environment to setup/update, set the PYTHONUSERBASE environment variable to force to only using what is installed directly within the Conda environment.

  • For individual research tasks, create self-contained Conda environments to enable reproducibility and sharing.