Python venv setup no longer working as expected, build failing


My Django project builds have started failing as of Friday, Sept 23 2022.

This is the error that I receive:

#!/bin/bash -eo pipefail
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -r src/development.txt

Error: [Errno 2] No such file or directory: '/home/circleci/repo/venv/bin/python'

Exited with code exit status 1
CircleCI received exit code 1

The excerpt of my config.yml file:

- restore_cache:
    keys: v2.1-dependencies-{{ checksum "src/requirements.txt" }}
- run:
    name: Install Python dependencies in the venv
    command: |
        python -m venv ./venv
        . venv/bin/activate
        pip install --upgrade pip
        pip install -r src/requirements.txt
- save_cache:
    key: v2.1-dependencies-{{ checksum "src/requirements.txt" }}
        - "venv"

This is almost identical to the steps outlined in the documentation here:

Note: I do have a workaround, which involves changing one of the commands to:

rm -rf venv && python -m venv venv

This seems to defeat the purpose of caching though if I remove the venv directory every time.

Any thoughts or help would be appreciated. Thanks.