Skip to main content

Installation

Requirements

The Apify SDK requires Python version 3.10 or above to run Python Actors locally.

Installation

The Apify Python SDK is available as apify package on PyPi. To install it, run:

pip install apify

When you create an Actor using the Apify CLI, the Apify SDK for Python is installed for you automatically.

If you are not developing Apify Actors and you just need to access the Apify API from Python, consider using the Apify API client for Python directly.

Adding dependencies

First, add the dependencies in the requirements.txt file in the Actor source folder.

Then activate the virtual environment in .venv:

source .venv/bin/activate

Finally, install the dependencies:

python -m pip install -r requirements.txt