| title | Installation |
|---|---|
| sidebar_label | Installation |
| description | Learn how to install the Apify SDK for Python using pip and manage dependencies for your Actor projects. |
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock';
The Apify SDK requires Python version 3.10 or above to run Python Actors locally.
The Apify Python SDK is available as apify package on PyPi. To install it, run:
pip install apifyWhen 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.
First, add the dependencies in the requirements.txt file in the Actor source folder.
Then activate the virtual environment in .venv:
Finally, install the dependencies:
python -m pip install -r requirements.txt