---
name: codeengine-ts-build-python
title: Why does my Python app fail to deploy?
description: When you build a Python app from source, the image builds and is visible in Container Registry. However, the app fails to deploy.
last-updated: 2023-04-24
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/codeengine?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Why does my Python app fail to deploy?
{: #ts-build-python}
{: troubleshoot}

When you build a Python app from source, the image builds and is visible in Container Registry. However, the app fails to deploy.  
{: tsSymptoms}

When you build Python from a buildpack, the buildpack does not provide a way to define a start process. By default, it sets the start process to `python`, which starts the correct version's REPL. To run a Python program, the `Procfile` mechanism can be used to override the default start process: `web`.
{: tsCauses}


The following `Procfile` sets the `entrypoint` of the resulting image to `main.py` and must be present in the root of the context directory.
{: tsResolve}


```python
web: python main.py
```
{: codeblock}