Report this

What is the reason for this report?

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

Posted on September 11, 2023

Log:

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.646265462Z
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  https://do.co/apps-buildpack-python
2023-09-11T12:07:24.063268831Z ╰─────────────────────────────────────────────╼
2023-09-11T12:07:24.063281865Z
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.955993815Z
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 │  !     https://devguide.python.org/versions/#supported-versions
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: https://devcenter.heroku.com/articles/python-runtimes
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: https://devcenter.heroku.com/articles/python-runtimes
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  https://do.co/apps-buildpack-python
2023-09-11T12:07:55.651403067Z │
2023-09-11T12:07:55.660010659Z │  ✘ build failed


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!

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:

https://docs.digitalocean.com/products/app-platform/how-to/upgrade-buildpacks/

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

features:
- buildpack-stack=ubuntu-22

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

https://www.digitalocean.com/community/questions/how-can-i-use-digital-ocean-app-platform-with-php-8-2

Let me know how it goes!

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.