Hey
until recently, we have used the following image for our django project on circleci:
image: circleci/python:3.9.7-node-browsers
Now we are eager to upgrade to the new convenience image:
image: cimg/python:3.9.10-browsers
However, this breaks on step Install backend dependencies
with the following error:
#!/bin/bash -eo pipefail
python3.9 -m venv venv
source venv/bin/activate
pip3.9 install -r requirements-dev.txt
Error: [Errno 2] No such file or directory: '/home/circleci/project/venv/bin/python3.9'
Exited with code exit status 1
CircleCI received exit code 1
Here is the CircleCI config.yml
version: 2.1
workflows:
version: 2
build_and_test:
jobs:
- build:
filters:
branches:
ignore: /^master$/
aliases:
images:
python-node-docker-image: &python-node-docker-image
image: cimg/python:3.9.10-browsers
postgres-docker-image: &postgres-docker-image
image: postgres:12.9-alpine
jobs:
build:
docker:
- *python-node-docker-image
- *postgres-docker-image
resource_class: large
steps:
- checkout
- run:
name: "Install system dependencies"
command: |
sudo apt-get update && sudo apt-get install -y gettext && sudo npm install -g npm@7
- restore_cache:
key: venv-{{ checksum "requirements-dev.txt" }}
- run:
name: "Install backend dependencies"
command: |
python3.9 -m venv venv
source venv/bin/activate
pip3.9 install -r requirements-dev.txt
- save_cache:
key: venv-{{ checksum "requirements-dev.txt" }}
paths:
- "venv"
- run:
name: "Compile backend translations"
command: |
source venv/bin/activate
./scripts/compile-backend-messages.sh
- run:
name: "Backend type-check"
command: |
source venv/bin/activate
./scripts/type-check-backend.sh
- run:
name: "Backend tests"
command: |
source venv/bin/activate
python3.9 manage.py test
- persist_to_workspace:
root: .
paths:
- venv
- locale
- store_artifacts:
path: /tmp/artifacts
- store_artifacts:
path: test-results
- store_test_results:
path: test-results
Is there anything particulary wrong with this? Could not find anything in the docs about this The code itself did not change besides the image!
I SSH’d into the seesion and could actually do the step of installing manually… So I am not sure, what could be wrong here. This config has always been working fine. I have ommited some of the frontend steps, since they arent necessary here.
I am happy for any pointers you could give me!
Thanks a lot