Python installation in cflinuxfs4 stack for TPCF
search cancel

Python installation in cflinuxfs4 stack for TPCF

book

Article ID: 430891

calendar_today

Updated On:

Products

VMware Tanzu Platform - Cloud Foundry

Issue/Introduction

 

  • Non-Python apps deployed to Tanzu Platform for Cloud Foundry (TPCF) using the cflinuxfs4 stack fail to stage or start after a platform upgrade.

  • The Non-Python apps rely on a python script for initialization. 
  • App container logs output errors indicating a missing binary, such as:/usr/bin/env: 'python3': No such file or directory

  • Inspecting container instances on older TPCF versions shows /home/vcap/deps/0/bin/python3 present in the container filesystem. 

 

Environment

TPCF

Cause

In TPCF releases prior to 6.0.26, Python3 binary in included in the commercial cflinuxfs4 stack. Apps that relied on this container continued to run temporarily. Upgrading to TPCF 6.0.26 or above removes this unintended binary, which breaks apps expecting a system-level Python binary.

Resolution

Since TPCF 6.0.26,  if your non-Python application (e.g., Nginx, Java, or Node.js) relies on a Python runtime, you must explicitly supply Python using Cloud Foundry multi-buildpacks. Modify your application’s manifest.yml to add python_buildpack as a supply buildpack before your primary buildpack:

applications:
- name: app-nginx
  buildpacks:
  - python_buildpack 
  - nginx_buildpack