Skip to content

Python User Guide

Pengyao Jiang edited this page Jan 30, 2025 · 5 revisions

Environment setup (For Python)

We need to use mamba as the environment manager to set up on SOL/Phoenix (similar to conda). Here is the detailed link for support:

Environment Setup Guide

  • You can create different mamba environments for different python versions, and install dependent packages under specific a python version. You need to activate the environment every time before you perform any analysis.

  • Say you want to create a mamba environment for python 3.3, use conda create -y --name py33 python==3.3.0

  • To load the above-created environment, use source activate py33 (or more generally: source activate <envname>)

  • Use source deactivate to leave the current environment.

However, if you are using a YAML file to set up your environment, I strongly recommend you not to follow the instructions from the link but directly use the command line: conda env create -n <envname> -f <filename>

While setting up your environment, you can use -h frequently to see the guides to remove, update, create, list packages, and etc.

Jupiter environment setup(for Python)

https://asurc.atlassian.net/wiki/spaces/KESC/pages/1915224178/Preparing+Python+Environments+for+Jupyter

Clone this wiki locally