Could not install packages due to an EnvironmentError: Could not find a suitable TLS CA certificate bundle


2023-09-11T12:07:14.068171777Z ╭──────────── git repo clone ───────────╼
2023-09-11T12:07:14.068209797Z │  › fetching app source code
2023-09-11T12:07:14.068213912Z │ => Selecting branch "main"
2023-09-11T12:07:22.493876798Z │ => Checking out commit "1190a939239f918a1fecd7a0ca45a6238b436030"
2023-09-11T12:07:23.602301627Z │
2023-09-11T12:07:23.608418491Z │  ✔ cloned repo to /workspace
2023-09-11T12:07:23.646228439Z ╰────────────────────────────────────────╼
2023-09-11T12:07:23.851594692Z ╭──────────── buildpack detection ───────────╼
2023-09-11T12:07:23.867523626Z │  › using Ubuntu 18.04 stack
2023-09-11T12:07:24.060731031Z │ Detected the following buildpacks suitable to build your app:
2023-09-11T12:07:24.060756230Z │
2023-09-11T12:07:24.060759385Z │    digitalocean/python-appdetect  v0.0.3
2023-09-11T12:07:24.060761312Z │    heroku/python                  v2.234.4  (Python)
2023-09-11T12:07:24.060763035Z │    digitalocean/procfile          v0.0.4    (Procfile)
2023-09-11T12:07:24.060764799Z │    digitalocean/custom            v0.1.2    (Custom Build Command)
2023-09-11T12:07:24.060766593Z │
2023-09-11T12:07:24.060769223Z │ For documentation on the buildpacks used to build your app, please see:
2023-09-11T12:07:24.060771031Z │
2023-09-11T12:07:24.060772830Z │    Python  v2.234.4
2023-09-11T12:07:24.063268831Z ╰─────────────────────────────────────────────╼
2023-09-11T12:07:24.066071532Z ╭──────────── build caching ───────────╼
2023-09-11T12:07:24.068331231Z │  › checking for cache from a previous build
2023-09-11T12:07:26.584078882Z │ Restoring metadata for "heroku/python:shim" from cache
2023-09-11T12:07:27.733977686Z │ Restoring data for "heroku/python:shim" from cache
2023-09-11T12:07:42.955813707Z ╰───────────────────────────────────────╼
2023-09-11T12:07:42.959169425Z ╭──────────── app build ───────────╼
2023-09-11T12:07:53.075187068Z │ -----> Using Python version specified in runtime.txt
2023-09-11T12:07:53.405760931Z │  !
2023-09-11T12:07:53.405803953Z │  !     Python 3.7 reached its upstream end-of-life on June 27th, 2023, so no longer
2023-09-11T12:07:53.405809124Z │  !     receives any security updates:
2023-09-11T12:07:53.405811890Z │  !
2023-09-11T12:07:53.405814026Z │  !
2023-09-11T12:07:53.405816031Z │  !     Support for Python 3.7 will be removed from this buildpack in October 2023.
2023-09-11T12:07:53.405818218Z │  !
2023-09-11T12:07:53.405821249Z │  !     Upgrade to a newer Python version as soon as possible to keep your app secure.
2023-09-11T12:07:53.405824374Z │  !     See:
2023-09-11T12:07:53.405841635Z │  !
2023-09-11T12:07:53.405845616Z │  !
2023-09-11T12:07:53.405848718Z │  !     A Python security update is available! Upgrade as soon as possible to: python-3.7.17
2023-09-11T12:07:53.405852030Z │  !     See:
2023-09-11T12:07:53.405855359Z │  !
2023-09-11T12:07:53.407999663Z │ -----> Requirements file has been changed, clearing cached dependencies
2023-09-11T12:07:53.787510819Z │ -----> Installing python-3.7.0
2023-09-11T12:07:54.659120758Z │ -----> Installing pip 23.2.1, setuptools 68.0.0 and wheel 0.41.0
2023-09-11T12:07:55.493270768Z │ Could not install packages due to an EnvironmentError: Could not find a suitable TLS CA certificate bundle, invalid path: .heroku/python/lib/python3.7/ensurepip/_bundled/pip-10.0.1-py2.py3-none-any.whl/pip/_vendor/certifi/cacert.pem
2023-09-11T12:07:55.493324251Z │
2023-09-11T12:07:55.522602803Z │ ERROR: failed to build: exit status 1
2023-09-11T12:07:55.647751132Z │
2023-09-11T12:07:55.651095344Z │
2023-09-11T12:07:55.651116684Z │ For documentation on the buildpacks used to build your app, please see:
2023-09-11T12:07:55.651120393Z │
2023-09-11T12:07:55.651123064Z │    Python  v2.234.4
2023-09-11T12:07:55.651403067Z │
2023-09-11T12:07:55.660010659Z │  ✘ build failed

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

It sounds like you are using an old buildpack on the App Platform. I could suggest upgrading your buildpacks by following the steps here:

Alternatively, you can manually specify the new version by adding the following to your app spec file:

- buildpack-stack=ubuntu-22

For more information on this I could suggest this discussion here:

Let me know how it goes!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel