This repo provides resources to be used before and after the 2024-APR-05 workshop. During the workshop, participants will also practice Git commands by cloning and making pull requests to this repo.
Creation of virtual environments allows us to build a stable, reproducible, and portable environment. This strategy is applicable when you code in Python, R, etc.
Users may create multiple virtual environments (VE) as project needs evolve. For instance, you may have created a VE that used R 4.1.1 last year, and wish to create a new one as you transition to R 4.3.1.
The three general steps of building a VE are:
Below, we provide abbreviated steps to get you started in building your own VE with Python 3.12; more detailed instructions can be found in this Primer.
Note that we will use a command-line software called Conda that can be used in Windows, macOS, and other systems.
Program > Anaconda Powershell
Change your current directory to your personal drive (U:). Do so by typing below in PowerShell:
U:
Create virtual environment (VE) named py3.12 by typing a command like below in PowerShell:
conda create --name py3.12 python=3.12
Activate this VE with a command like this:
conda activate py3.12
When your new VE is activated, you will notice the its name appearing at the front like this:
py3.12 U:\>
To install interactive Python, enter:
pip install ipython
To install other Python packages, enter:
pip install plotly polars scikit-learn scikit-survival streamlit
Install ipykernel
pip install ipykernel
To Create Jupyter kernel for use in Jupyter notebook:
ipython kernel install --user --name=py3.12-ker
where py3.12-ker is the name of the kernel that you may select from the menu once you launched Jupyter notebook (top-right corner)