After following these steps make sure your IDE/Jupyter Notebook is using the right enviroment!
Before executing any sample code provided in this documentation, ensure your development environment is correctly configured. It is recommended to create a dedicated virtual environment to manage and isolate all dependencies related to Polymarket packages.

Step 1: Check Python Installation

Make sure Python is installed on your machine. You can check by running:

python3 --version

If Python is not installed, download it from python.org.

Step 2: Create the Virtual Environment

In your project directory, run the following command to create a virtual environment:

python3 -m venv venv

This will create a folder named venv that contains a fresh Python environment.

Step 3: Activate the Virtual Environment

  • On macOS/Linux:
source venv/bin/activate
  • On Windows (Command Prompt):
venv\Scripts\activate
  • On Windows (PowerShell):
.\venv\Scripts\Activate.ps1

Once activated, your shell prompt should change to show the virtual environment name.

Step 4: Install Dependencies

You can now install packages using pip:

pip install py-clob-client