I am attempting to deploy a python AWS CDK app through a Gitlab runner automated deploy using a gitlab-ci.yml script. The failure is happening at the synth stage:
cdk-synth:
stage: cdk-synth
cache: []
variables:
CDK_PREFIX: $CDK_PREFIX
tags:
- aws-cdk
image: node:14-alpine
before_script:
- apk add --no-cache python3 py3-pip
- npm install -g aws-cdk@2.15.0
- npm install -g cdk-assume-role-credential-plugin
- python3 -m venv .venv
- source .venv/bin/activate
- pip install --upgrade pip
- pip install -r requirements.txt
script:
- echo $CDK_PREFIX and "$CDK_PREFIX"
- cdk synth
This script was working successfully without error until adding pandas to the requirements.txt file below:
aws-cdk-lib==2.15.0
constructs>=10.0.0,<11.0.0
urllib3==1.26.8
requests==2.27.1
boto3==1.20.51
pandas==1.4.0
The automated deploy pipeline is now failing with an error of:
Collecting pandas==1.4.0
Downloading pandas-1.4.0.tar.gz (4.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 93.8 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
I have attempted re-aligning the versions and updating pip without success. A google search suggests there is a dependency issue with the 'crypptography' package but does not suggest a clear fix besides uninstalling and re-installing pip which did not correct the issue.