Skip to main content

Installation

This guide covers installing Pycord on all major platforms. Choose the installation method that best fits your needs.

Prerequisites

Python 3.10 or higher is required. Pycord supports Python 3.10, 3.11, 3.12, and 3.13.
Verify your Python version:
python3 --version  # Linux/macOS
py --version       # Windows

Basic Installation

The basic installation includes all core features except voice support.
python3 -m pip install -U py-cord

Installation with Voice Support

To enable voice features like audio playback and recording, install Pycord with voice support:
python3 -m pip install -U "py-cord[voice]"

Linux Voice Support Prerequisites

On Linux, you must install system dependencies before installing voice support:
sudo apt install libffi-dev python3.10-dev
Replace python3.10-dev with your Python version (e.g., python3.11-dev, python3.12-dev).

Installation with Speed Optimizations

For improved performance with JSON parsing and HTTP operations:
python3 -m pip install -U "py-cord[speed]"
This includes:
  • msgspec - Faster JSON serialization/deserialization
  • aiohttp[speedups] - Enhanced HTTP performance with aiodns, brotli, and cchardet

Complete Installation (All Features)

To install Pycord with all optional dependencies:
python3 -m pip install -U "py-cord[voice,speed]"

Development Version

To install the latest development version from GitHub:
Use the development version to test new features before they’re officially released. Note that development versions may be unstable.

Direct Installation from GitHub

python3 -m pip install git+https://github.com/Pycord-Development/pycord

Clone and Install

git clone https://github.com/Pycord-Development/pycord
cd pycord
python3 -m pip install -U .[voice]
Using a virtual environment is recommended to avoid dependency conflicts with other Python projects.
1

Create Virtual Environment

python3 -m venv venv
2

Activate Virtual Environment

source venv/bin/activate
3

Install Pycord

pip install -U py-cord

Verify Installation

Confirm Pycord is installed correctly:
import discord
print(discord.__version__)
Run this code to see your installed Pycord version.

Optional Dependencies

Here’s a complete list of optional packages:
PackagePurposeInstall Extra
PyNaClVoice support[voice]
msgspecFaster JSON operations[speed]
aiodnsFaster DNS resolution[speed]
brotliBrotli compression support[speed]
cchardetFaster character encoding detection[speed]

Troubleshooting

Permission Errors

If you encounter permission errors, try using --user flag:
pip install --user py-cord

SSL Certificate Errors

On macOS, you may need to install certificates:
/Applications/Python\ 3.x/Install\ Certificates.command

Import Errors

Ensure you’re using the correct Python interpreter that has Pycord installed:
python3 -c "import discord; print(discord.__file__)"

Next Steps

Now that Pycord is installed, you’re ready to create your first bot! Head over to the Quickstart Guide to build your first Discord bot.

Build docs developers (and LLMs) love