Ody-Autocalib is a Python-based program that requires Python 3.11. This guide will walk you through the steps to download and install Python 3.11, set up a virtual environment, install the necessary dependencies, and run the program.
- Python 3.11 installed (see instructions below)
- Git (optional, for cloning the repository)
-
Download Python 3.11:
- Visit the official Python website: Python 3.11 Downloads
- Download the appropriate installer for your operating system.
-
Install Python 3.11:
- Run the installer and follow the on-screen instructions.
- Make sure to check the box that says "Add Python to PATH" if this is your first python installation.
- Verify the installation by opening a command prompt or PowerShell and typing:
This should display the installed version of Python 3.11.
py -3.11 --version
-
Update package list:
sudo apt update
-
Install prerequisites:
sudo apt install -y software-properties-common
-
Add the deadsnakes PPA (if using Ubuntu/Debian):
sudo add-apt-repository ppa:deadsnakes/ppa
-
Install Python 3.11:
sudo apt install -y python3.11 python3.11-venv python3.11-dev
-
Verify the installation:
python3.11 --version
To avoid conflicts with other Python projects, it's recommended to use a virtual environment.
-
Navigate to your project directory:
cd path\to\ody-autocalib
-
Create a virtual environment: Use the following command to create a virtual environment in your project directory:
py -3.11 -m venv .venv
-
Activate the virtual environment:
-
For PowerShell:
.\.venv\Scripts\Activate.ps1
-
For Command Prompt:
.\.venv\Scripts\Activate.bat
Once activated, your command prompt should show that you're working within the
.venv
environment. -
-
Navigate to your project directory:
cd path/to/ody-autocalib
-
Create a virtual environment: Use the following command to create a virtual environment in your project directory:
python3.11 -m venv .venv
-
Activate the virtual environment:
source .venv/bin/activate
Once activated, your terminal prompt should show that you're working within the
.venv
environment.
- Install the required packages:
With the virtual environment activated, install the dependencies listed in the
requirements.txt
file:pip install -r requirements.txt
- Run the application:
After installing the dependencies, you can run the
app.py
script:python app.py
When you're done, you can deactivate the virtual environment by simply typing:
deactivate
-
If you encounter issues with permissions while activating the virtual environment in PowerShell on Windows, you may need to change the execution policy:
Set-ExecutionPolicy RemoteSigned -Scope Process
-
Ensure that you are using Python 3.11 by explicitly invoking
py -3.11
on Windows orpython3.11
on Linux.