|
9 | 9 | This repository contains a collection of materials for teaching/learning Python 3 (3.10+). |
10 | 10 |
|
11 | 11 | #### Requirements |
12 | | -* Have Python 3.10 or newer installed. You can check the version by typing `python3 --version` in your command line. You can download the latest Python version from [here](https://www.python.org/downloads/). |
13 | | -* Have [Jupyter Notebook installed](http://jupyter.readthedocs.io/en/latest/install.html). `pip install jupyter` is sufficient in most cases. |
| 12 | +* Have Python 3.10 or newer installed (Python 3.11 or 3.12 is preferred). You can check the version by typing `python3 --version` in your command line. |
| 13 | +* Have [Jupyter Notebook installed](http://jupyter.readthedocs.io/en/latest/install.html). |
14 | 14 |
|
15 | 15 | If you can not access Python and/or Jupyter Notebook on your machine, you can still follow the web based materials. However, you should be able to use Jupyter Notebook in order to complete the exercises. |
16 | 16 |
|
| 17 | +#### Setup Instructions |
| 18 | + |
| 19 | +##### For macOS Users |
| 20 | + |
| 21 | +1. **Install Python 3.11 or 3.12** |
| 22 | + |
| 23 | + **Option A: Using Official Installer (Recommended for beginners)** |
| 24 | + - Visit [python.org/downloads](https://www.python.org/downloads/) |
| 25 | + - Download Python 3.11 or 3.12 installer for macOS |
| 26 | + - Run the `.pkg` installer and follow the installation wizard |
| 27 | + - Verify installation: `python3 --version` |
| 28 | + |
| 29 | + **Option B: Using Homebrew (Recommended for developers)** |
| 30 | + ```bash |
| 31 | + # Install Homebrew if not already installed |
| 32 | + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
| 33 | + |
| 34 | + # Install Python 3.12 (or 3.11) |
| 35 | + brew install python@3.12 |
| 36 | + |
| 37 | + # Verify installation |
| 38 | + python3 --version |
| 39 | + ``` |
| 40 | + |
| 41 | +2. **Set up the project** |
| 42 | + ```bash |
| 43 | + # Clone this repository |
| 44 | + git clone https://github.com/loitragg/learn-python3.git |
| 45 | + cd learn-python3 |
| 46 | + |
| 47 | + # Create virtual environment, activate it, and install dependencies |
| 48 | + python3 -m venv .venv && source .venv/bin/activate && pip install -r dev-requirements.txt |
| 49 | + ``` |
| 50 | + |
| 51 | +3. **Start learning** |
| 52 | + ```bash |
| 53 | + # Make sure your virtual environment is activated |
| 54 | + source .venv/bin/activate |
| 55 | + |
| 56 | + # Launch Jupyter Notebook |
| 57 | + jupyter notebook |
| 58 | + ``` |
| 59 | + |
| 60 | +##### For Windows Users |
| 61 | + |
| 62 | +1. **Install Python 3.11 or 3.12** |
| 63 | + - Visit [python.org/downloads](https://www.python.org/downloads/) |
| 64 | + - Download Python 3.11 or 3.12 installer for Windows |
| 65 | + - Run the installer and **IMPORTANT: Check "Add Python to PATH"** during installation |
| 66 | + - Verify installation by opening Command Prompt or PowerShell and typing: `python --version` |
| 67 | + |
| 68 | +2. **Set up the project** |
| 69 | + |
| 70 | + Open Command Prompt or PowerShell: |
| 71 | + ```bash |
| 72 | + # Clone this repository |
| 73 | + git clone https://github.com/jerry-git/learn-python3.git |
| 74 | + cd learn-python3 |
| 75 | + |
| 76 | + # Create virtual environment |
| 77 | + python -m venv .venv |
| 78 | + |
| 79 | + # Activate virtual environment |
| 80 | + .venv\Scripts\activate |
| 81 | + |
| 82 | + # Install dependencies |
| 83 | + pip install -r dev-requirements.txt |
| 84 | + ``` |
| 85 | + |
| 86 | +3. **Start learning** |
| 87 | + ```bash |
| 88 | + # Make sure your virtual environment is activated |
| 89 | + .venv\Scripts\activate |
| 90 | + |
| 91 | + # Launch Jupyter Notebook |
| 92 | + jupyter notebook |
| 93 | + ``` |
| 94 | + |
17 | 95 | #### Usage (locally) |
18 | 96 |
|
19 | 97 | 1. Clone or download this repository. |
|
0 commit comments