Skip to content

Setting up a development environment (Linux)

Brian Wheeler edited this page Apr 8, 2026 · 3 revisions

Software Environment

This has been tested on this environment

  • Linux (Fedora 44, should work on others)
  • Python 3.12
  • Visual Studio Code

Set up the initial venv

Create a directory that will hold all of the repositories that we're working with as well as the python virtual environment:

mkdir AMPAV
cd AMPAV
python3.12 -mvenv .venv
source .venv/bin/activate

Install development packages.

We'll need a few tools for managing the installation. The build module is used to build the python packages and twine is used to publish those packages to a repository

pip install -U pip
pip install build twine

Clone and install the repositories

Clone the repositories you'll be working on. It's probably easiest to clone all of the python repositories, but ampav-core will always be included.

git clone https://github.com/AMPAV/ampav-core.git
git clone https://github.com/AMPAV/ampav-whisper.git
...

The repositories should be installed in "editable" mode – that allows the packages to be modified and tested without the need to reinstall them every time a change is made.

pip install -e ./ampav-core
pip install -e ./ampav-whisper
...

Do development

If you aren't in the venv you'll need to activate it (if you just came from the instructions above you can skip this):

cd AMPAV
source .venv/bin/activate

Start Visual Studio Code in the current directory:

code .

At this point you should have access to all of the repositories and changes within them are tracked with their respective repository.

Fixing import errors on ampav.*

The language server in vscode will sometimes get confused because we're actually editing two different packages which reside in the same namespace directory. This will manifest itself as an import error in the editor even though the code will work as expected. We can solve this by creating/modifying the .vscode/settings.json file in the AMPAV directory to give hints to the language server:

{
   "python.analysis.extraPaths": [
       "./ampav-core",
       "./ampav-whisper"
   ]
}

Clone this wiki locally