Skip to content

CenterForTheBuiltEnvironment/arch-298-energy-modelling-with-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Energy Modelling with Python

Python Course Preparation Guide

Hi 👋 and welcome to the course! 🎉

Before we start, please make sure your computer is ready. This guide explains everything you need to install and configure so you can follow along with the course smoothly. While you will be able to follow the course without setting up your personal environment on your own computer (e.g. by using Google Colab), we encourage you to take the steps below. This will benefit all your potential future workflows and set you up to use Python and version control in a professional way.


1. Install Python

We’ll use Python 3.10 or later.

✅ Verify Installation

python --version

Expected output: Python 3.10.x or higher.

2. Install Visual Studio Code (VS Code)

We’ll use VS Code as our code editor and Jupyter Notebook environment.

  • Download here: https://code.visualstudio.com/
  • Recommended extensions (can be installed separately within VS Code):
    • Python (Microsoft)
    • Jupyter (Microsoft)

Once installed, you’ll be able to open and run Jupyter Notebooks directly inside VS Code (no need to open a browser separately). You might also use other IDEs like PyCharm. Most of the steps outlined in this guide should similarly apply there, too.

3. Set Up a Virtual Environment

It’s best practice to use a virtual environment for Python projects. PLACEHOLDER REASONS FOR VENV.

In a new terminal window ...

# Navigate to your course folder
cd path/to/your/course/folder

# Create a virtual environment
python -m venv venv

# Activate it
# On Windows:
venv\Scripts\activate

# On macOS/Linux:
source venv/bin/activate

✅ You should see (venv) in your terminal prompt after activation.

4. Install Required Packages

pip install jupyter numpy pandas matplotlib

5. Run Jupyter Notebooks in VS Code

  1. Open VS Code.
  2. Use File > Open Folder and select your course folder.
  3. Create or open a .ipynb file.
  4. In the top-right corner of the notebook, select the correct Python interpreter (your virtual environment).
  5. Run cells using the ▶️ button that appears next to them.

6. Verify Everything Works

Open a new Jupyter Notebook in VS Code and paste the following code into a cell:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

print("NumPy version:", np.__version__)
print("pandas version:", pd.__version__)

plt.plot([1, 2, 3], [4, 5, 6])
plt.show()

✅ If you see the versions printed and a simple line plot, you’re all set!

7. Install and Configure Git & GitHub (Optional)

If you want to clone the course repository and track your own progress with Git and GitHub:

Install Git

git --version

Create a GitHub account

Sign up at https://github.com/.

Configure Git (one-time setup)

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

Connect Git with GitHub

You can connect in two ways:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •