Pre-work 1: Environment Setup & GitHub Basics

Overview

This assignment ensures you have properly set up your development environment and can use GitHub for version control. By completing this assignment, you will:

  1. Install Anaconda (if not already installed)
  2. Create a conda environment with all required packages for the bootcamp
  3. Verify your installation with a Python script
  4. Commit and push your verification results to GitHub

Instructions

Step 1: Install Anaconda (or Alternative)

Note: If you already have Miniconda, Miniforge, Mambaforge, or Mamba installed, you can use those instead - they all work with this assignment!

Option 1: Download Anaconda (Mac/Windows/Linux)

For Mac/Windows, download and install from: https://www.anaconda.com/download

For Windows users in WSL, use the Linux installer:

# Download the Linux installer in WSL
wget https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh

# Run the installer
bash Anaconda3-2024.10-1-Linux-x86_64.sh

# Follow the prompts and accept the license
# When asked to initialize conda, type 'yes'

# Restart your terminal or run:
source ~/.bashrc

Option 2: Install via Homebrew (Mac users only) If you have Homebrew installed:

brew install --cask anaconda

Then add conda to your PATH (follow the instructions shown after installation).

Verify installation by running:

conda --version

Step 2: Create Your Working Directory

Since this is a self-guided bootcamp, you’ll need a place to organize your files.

  1. Create a new folder for the bootcamp (e.g., RosettaBootcamp2025).
  2. Inside that folder, create a subfolder for this module (e.g., HW1-setup).
  3. Download the environment.yml and verify_setup.py files provided in the course materials (or create them manually if needed).

Step 3: Create the Conda Environment

Navigate to your working directory in your terminal and run:

conda env create -f environment.yml

This will create an environment named bootcamp2025_HW1 with all required packages: - Python 3.11 - PyRosetta (for protein structure manipulation - channels configured in environment.yml) - NumPy (numerical computing) - Pandas (data analysis) - Matplotlib & Seaborn (visualization) - Jupyter (interactive notebooks) - SciPy (scientific computing) - scikit-learn (machine learning) - Biopython (bioinformatics tools)

Note: The environment.yml file includes the RosettaCommons conda channel, so you don’t need to configure it manually.

Step 4: Activate the Environment

conda activate bootcamp2025_HW1

You should see (bootcamp2025_HW1) in your terminal prompt.

Step 5: Run the Verification Script

python verify_setup.py

This script will: - Check that all required packages are installed - Display version information for each package - Generate a verification_result.json file

If all checks pass, you should see:

🎉 SUCCESS! All packages are installed correctly!

If some checks fail, the script will provide guidance on what went wrong.

Step 6: Verify Your Setup

Open the generated verification_result.json file to confirm that verification_passed is set to true. This confirms your environment is ready for the rest of the bootcamp!

Troubleshooting

WarningCommon Issues

PyRosetta Installation Issues

If PyRosetta fails to install: 1. Make sure you’re using the environment.yml file which includes the RosettaCommons channel 2. Try creating the environment again with verbose output: conda env create -f environment.yml --verbose 3. If that fails, try installing PyRosetta separately: conda install -c https://conda.rosettacommons.org pyrosetta 4. Check that you’re using a compatible Python version (3.11 is specified in environment.yml)

Import Errors

If packages are installed but imports fail: 1. Make sure you’ve activated the environment: conda activate bootcamp2025_HW1 2. Try reinstalling the problematic package: conda install --force-reinstall <package-name>

Git Issues

If you have trouble with git: - Make sure git is installed: git --version - Configure your git identity if needed: bash git config --global user.name "Your Name" git config --global user.email "your.email@example.com"

Authentication with GitHub

If you have trouble pushing to GitHub, you may need to set up authentication: - Use GitHub’s personal access token: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token - Or set up SSH keys: https://docs.github.com/en/authentication/connecting-to-github-with-ssh

Questions and Getting Help

If you have questions or encounter issues while working through this module, please open an issue on the GitHub repository (GitHub account required).