- Newest
- Most votes
- Most comments
Hello. I've had the same issue. I was trying to deploy a nodejs API from my github repo that has some python scripts in it. I kept getting that exact same error without any details as to why it's happening. After hours of debugging I found out that it was a file in my repo called .python-version . So for anyone facing this issue- make you remove that file and you shouldn't be seeing that error. I had that file to specify which python version to download so only downside is i had to remove it. Hope this helps anyone in the future.
Hello.
The solution in the URL below seems to be solved by including it in "pre-run" instead of "build".
Please try it just to be sure.
https://repost.aws/questions/QUtR_3nFS4T3y56OHsNzEQ0w/app-runner-django-deployment-error-python-version3-11#ANg5eiaTNXRfynNNtgG7jB9A
What are you trying to install using "requirements.txt"?
It is possible that you are trying to install something that cannot be used with Python 3.11.9 and it is failing.
Also, the example described in the document below uses "pip3" instead of "pip" command, so please try that as well.
https://docs.aws.amazon.com/apprunner/latest/dg/config-file-examples.html
version: 1.0
runtime: python311
build:
commands:
build:
- pip3 install -r requirements.txt
run:
runtime-version: 3.11.9
command: sh startup.sh
network:
port: 8000
in the requirements.txt file I try to install the following dependencies:
asgiref==3.8.1 certifi==2024.7.4 cffi==1.17.0 charset-normalizer==3.3.2 cryptography==43.0.0 defusedxml==0.8.0rc2 distlib==0.3.8 Django==4.2.2 django-templated-mail==1.1.1 djangorestframework==3.15.2 djangorestframework-simplejwt==5.3.1 djoser==2.2.3 filelock==3.15.4 gunicorn==20.1.0 idna==3.8 oauthlib==3.2.2 pillow==10.4.0 platformdirs==4.2.2 psycopg2==2.9.9 pycparser==2.22 PyJWT==2.9.0 python-decouple==3.8 python3-openid==3.2.0 requests==2.32.3 requests-oauthlib==2.0.0 setuptools==73.0.1 social-auth-app-django==5.4.2 social-auth-core==4.5.4 sqlparse==0.5.1 tzdata==2024.1 urllib3==2.2.2 virtualenv==20.26.3 whitenoise==6.4.0Have you tried changing it to "pip3"?
version: 1.0 runtime: python311 build: commands: build: - pip3 install -r requirements.txt run: runtime-version: 3.11.9 command: sh startup.sh network: port: 8000
Relevant content
- asked 2 years ago
- asked 2 years ago
- asked 8 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 3 years ago

@Chris you're a life saver. Thanks man.