Installing Red on macOS¶
Installing the pre-requirements¶
To install pre-requirements, we first have to install Brew. In Finder or Spotlight, search for and open Terminal. In the terminal, paste the following, then press Enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
After the installation, install the required packages by pasting the commands and pressing enter, one-by-one:
brew install firstname.lastname@example.org brew install git brew tap homebrew/cask-versions brew install --cask temurin11
By default, Python installed through Homebrew is not added to the load path. To fix this, you should run these commands:
profile=$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile)) echo 'export PATH="$(brew --prefix)/email@example.com/bin:$PATH"' >> "$profile" source "$profile"
Creating a Virtual Environment¶
If you want to learn more about virtual environments, see page: About Virtual Environments
We require installing Red into a virtual environment. Don’t be scared, it’s very straightforward.
This is the quickest way to get your virtual environment up and running, as
venv is shipped with
First, choose a directory where you would like to create your virtual environment. It’s a good idea
to keep it in a location which is easy to type out the path to. From now, we’ll call it
redenv and it will be located in your home directory.
Create your virtual environment with the following command:
python3.9 -m venv ~/redenv
And activate it with the following command:
You must activate the virtual environment with the above command every time you open a new shell to run, install or update Red.
Choose one of the following commands to install Red.
To install without additional config backend support:
python -m pip install -U pip setuptools wheel python -m pip install -U Red-DiscordBot
Or, to install with PostgreSQL support:
python -m pip install -U pip setuptools wheel python -m pip install -U "Red-DiscordBot[postgres]"
Setting Up and Running Red¶
After installation, set up your instance with the following command:
This will set the location where data will be stored, as well as your storage backend and the name of the instance (which will be used for running the bot).
Once done setting up the instance, run the following command to run Red:
redbot <your instance name>
It will walk through the initial setup, asking for your token and a prefix. You can find out how to obtain a token with this guide.
If it’s the first time you’re using Red, you should check our Getting started guide that will walk you through all essential information on how to interact with Red.