Skip to content

Python Application FAQ

How to choose a Python version

When uploading your application, you can choose the desired Python version on the second step. Available versions:

Version Description
2 Python 2 (deprecated)
3.8 Python 3.8
3.9 Python 3.9
3.10 Python 3.10
3.11 Python 3.11 (Recommended)
3.12 Python 3.12
3.13 Python 3.13
3 Latest — most recent version with auto-fallback

Auto-fallback

If "3 (Latest)" is selected and the build fails, the system will automatically retry with the stable version 3.11.

How to install a library before launching your app

By default, our service attempts to automatically detect and download all dependencies required by your code using the pipreqs library, generating a requirements.txt file. However, not all libraries may be found and downloaded, so it's better to generate this file locally on your machine, include it in your code archive, so all dependencies and required versions are explicitly specified, and then redeploy your application.

More about generating the requirements.txt file can be found in this article.

Alternative method: you can manually specify commands to install the required libraries by creating a file called deployf-install.sh and including it in your code archive, more details here.

Alternative method 2 (new): you can specify the libraries you need on the second step of the upload process (right after uploading the archive), by selecting "Specify manually" from the "How to load libraries" dropdown menu.

alt text
How to specify libraries manually

How to install a library in an already running app

If the application is already running and you need an additional library, you can install it by creating a file called deployf-bootstrap.sh and specifying the installation command in it, more details here.

How to upgrade pip

You need to create a deployf-install.sh file with the pip upgrade command, include it in your code archive and upload it to the hosting.

Example script that upgrades pip:

deployf-install.sh
#!/bin/bash
echo "Hello world!"
pip install --upgrade pip

More details here.

Where to find the libraries you need

You can find the library you need with its version on pypi.org. If you don't know which libraries your application needs, either ask the author of the application code you're using, or use the console tool pipreqs.

Example of using pipreqs in the terminal
pip install pipreqs
pipreqs /path/to/your/application

Didn't find an answer?

Still have questions? Ask us in the Telegram support chat