Complete Setup Guide

Getting TextLayer Core

If you haven’t cloned the TextLayer Core repository from the Installation Guide, you can download it using the following command:
Invoke-WebRequest -Uri "https://textlayer-core-latest.s3.amazonaws.com/textlayer-core-1.0.0.tar.gz" -OutFile "textlayer-core-1.0.0.tar.gz"
After downloading, extract the archive:
& 'C:\Program Files\7-Zip\7z.exe' x textlayer-core-1.0.0.tar.gz
& 'C:\Program Files\7-Zip\7z.exe' x textlayer-core-1.0.0.tar
cd textlayer-core-1.0.0

Install Python & Activate your environment

1. Install Python 3.12

  1. Open Microsoft Store
  2. Search for “Python 3.12”
  3. Click Get to install it.
  4. After installing, verify it’s installed by running the following command in PowerShell:
python --version
It should show the following:
Python 3.12.x
Specific versioning is dependent on time of installation, please check the official Python website for more information.

Install uv

2. Install uv for Windows

  1. Open PowerShell as Administrator and run the following command:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
UV Documentation: UV Installation for Windows

Activate your environment

3. Navigate to the backend directory

In PowerShell:
cd .\backend

3. Create Virtual Environment & Install Dependencies

Choose your preferred environment management approach:
uv venv --python 3.12
.venv\Scripts\activate
uv sync --dev

Option B: Using Conda

conda create -n textlayer python=3.12 -y
conda activate textlayer
uv sync --dev

Option C: Using venv

python -m venv .venv
.venv\Scripts\activate
uv sync --dev

4. Run the Flask App

Make sure you’re in the backend folder:
uv run flask run
Your app will now start with all the proper environment variables set automatically. The server will run on port 8000 in debug mode. If you would like to change the port, modify .flaskenv file and change the value of FLASK_RUN_PORT to the desired port.

Deactivate your environment

(Optional) Deactivate and clean up

If you want toremove the Python environment you’ve created in order to create a brand new one from scratch:

For uv/venv environments:

Deactivate the virtual environment:
deactivate
Delete the virtual environment:
Remove-Item -Recurse -Force .venv

For Conda environments:

Deactivate the conda environment:
conda deactivate
Remove the conda environment:
conda env remove -n textlayer