This guide will help you set up your development environment for the Autostitch project. Follow the instructions for your operating system.
I tested the instructions for my environment, but many of you use other platforms. I’ve generated install instructions with Claude Opus for a variety of operating systems. I edited them (and they look good to me!) but I wasn’t able to test every one of these. Please submit a bug report if you find a problem!
All platforms need:
numpy,
opencv-python, pillowThe instructions below are trying to get you set up with these requirements.
If you’re using Linux or Windows Subsystem for Linux (WSL), setup is straightforward.
Most Linux distributions come with Python. Check your version:
python3 --versionIf you need to install or upgrade Python:
# Ubuntu/Debian
sudo apt update
sudo apt install python3 python3-pip python3-tk
# Fedora
sudo dnf install python3 python3-pip python3-tkinterpip install numpy opencv-python pillowpython3 -c "import cv2; import numpy; import tkinter; print('Setup complete!')"If you’re using WSL and the GUI doesn’t display:
WSL2 with WSLg (Windows 11): GUI apps should work automatically.
WSL2 without WSLg: You need an X server on Windows:
macOS comes with Python, but it may be outdated. We recommend installing a recent version of Python via Homebrew:
# Install Homebrew if you don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Python
brew install python python-tkAlternatively, download and install Python from python.org.
pip3 install numpy opencv-python pillowpython3 -c "import cv2; import numpy; import tkinter; print('Setup complete!')"“No module named tkinter”: Reinstall Python with Tk support:
brew reinstall python-tkThese instructions are for using Anaconda on Windows. It bundles Python with common scientific packages and avoids many configuration headaches. You don’t have to use Anaconda for this course, but for non-CSSE majors this is the easist way to get set up with Python.
Important: On Windows, always use Anaconda Prompt instead of the regular Command Prompt when you are working with Python.
You’ll see a window that looks like Command Prompt but says
(base) at the beginning of the line. This means Anaconda is
active.
In Anaconda Prompt, type the following command and press Enter:
conda install numpy pillow opencv
When asked “Proceed ([y]/n)?”, type y and press Enter.
Wait for the installation to finish.
In Anaconda Prompt, type:
python -c "import cv2; import numpy; import tkinter; print('Setup complete!')"
If you see “Setup complete!”, you’re ready to go.
Open Anaconda Prompt (not regular Command Prompt)
Navigate to your project folder. For example, if your project is
in Documents\p2-autostitch:
cd Documents\p2-autostitchRun the GUI:
python gui.py“python” or “conda” is not recognized
You’re probably using regular Command Prompt instead of Anaconda Prompt. Close the window and open Anaconda Prompt from the Start menu.
The GUI window doesn’t appear or crashes
Make sure you’re not running Python from within OneDrive or a network
drive. Copy the project to a local folder like
C:\Projects\.
conda install is slow or fails
Try using conda-forge:
conda install -c conda-forge numpy pillow opencv