Unifier Wiki
  • Main Page
  • 👷Setup (existing instance)
    • Getting started
      • Discord
      • Revolt & Others
  • 💾Setup (self-hosted)
    • Getting Started
      • Unifier
      • Unifier (older versions)
      • Unifier Micro
      • Unifier Micro (older versions)
    • Upgrading Unifier
      • Manual rollback
    • Modding Unifier: things to note
  • 📚Guides
    • Unifier System
      • Configuring the bootloader
      • Switching Python versions
      • Managing your secrets
      • Data backups
    • Bridge
      • Global emojis
      • Moderation tools
      • Filters
      • Under Attack Mode
  • 🧩Modifiers
    • Introduction to Modifiers
    • Writing a Modifier
      • Custom Filters
      • Service: Content Processing
      • Service: Emojis
  • 🤔Compare
    • Unifier vs. Unifier Micro
    • Unifier vs. Conventional
    • Platform features
    • Benchmarks
  • 🔗Socials
    • Blog
    • Discord
    • Revolt
  • 📜Legal & Policies
    • Terms of Service
    • Privacy Policy
    • Community guidelines
Powered by GitBook
On this page
  • Step 1: FULLY shut Unifier down
  • Step 2: Configure new binary
  • Use with a virtual environment
  • Use without virtual environments
  • Step 3: Reinstall dependencies
  • Step 4: Restart Unifier
  1. Guides
  2. Unifier System

Switching Python versions

PreviousConfiguring the bootloaderNextManaging your secrets

Last updated 3 months ago

At some point, you may want to switch your Python version to a newer (or, in some cases, older) version. This may be because the current Python version is no longer supported, does not support certain dependencies on your system, etc.

On Unifier, you can easily change your Python version or environment.

Step 1: FULLY shut Unifier down

You will first need to shut the bot down if it is already running. To do this, you can run u!shutdown. This will save the data to disk and then stop the bot and the bootloader.

If Unifier is unresponsive, you can use Ctrl+C on the console to interrupt the process. Please note that this may result in data loss and should only be used as a last resort.

Step 2: Configure new binary

Unifier's bootloader lets you set custom Python binary paths, if the default Python binary doesn't suit your needs. To learn how to configure the bootloader, please read .

Use with a virtual environment

When using Unifier, we highly recommend you use it with a virtual environment. This allows you to separate Unifier's dependencies from globally installed libraries, so that installing Unifier won't break other programs and vice versa. Besides, if you somehow accidentally managed to break things in the virtual environment, you can simply delete the virtual environment and make a new one.

For example, to create a Python 3.12 virtual environment in Python in a .venv folder, you can run python3.12 -m venv .venv. Once you've done this, set the binary to ./.venv/bin/python to use the Python binary in the virtual environment.

Use without virtual environments

Although we highly recommend using virtual environments with Unifier, you can still use the global environment. Please note that this has the potential to break your global environment packages, so this should only be used when virtual environments cannot be used for whatever reason. If you break your global packages, we will not be able to help you.

For example, to use Python 3.12's global environment, you can simply set the binary to the command you use to run Python 3.12 (python3.12). Or, you can provide the binary file path (usually /usr/bin/python3.12).

Step 3: Reinstall dependencies

Since you're using a different environment which doesn't have the packages Unifier needs to run, you will need to reinstall them. Run the bootscript while passing the --install-deps option to run the dependency installer.

  • On Linux/macOS, run sh run.sh --install-deps.

  • On Windows, run ./run.bat --install-deps.

If everything goes well, the dependency installer will say that dependencies have installed.

Step 4: Restart Unifier

You can now restart Unifier! Run /about to verify that your Python version was properly changed.

📚
Configuring the bootloader