Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.48 KB

File metadata and controls

51 lines (37 loc) · 1.48 KB
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';

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` } { `.venv\\Scripts\\activate` }

Finally, install the dependencies:

python -m pip install -r requirements.txt