Skip to main content

Installation

General System Requirements

Most systems capable of running Python 3.9-3.12 will be compatible with the OpenBB Platform. A modern processor (five years or less), running an up-to-date operating system, with at least 4GB of RAM, is recommended. Maintaining the system with current patches ensures maximum compatibility. At a minimum, Windows and macOS should be:

  • Windows 10
  • Mac OS Big Sur

Linux users should run the command line update for the package manager, prior to installation.

Installer Package

An installer package is available for Mac and Windows machines. Files are available here.

It will handle the installation of Python, environment setup, and OpenBB packages with the latest versions.

danger

Users with v1.0.0 installations need to follow the steps below to update the version of OpenBB.

  1. In Finder/Explorer, open the folder where it was installed - probably in a folder, named "OpenBB", at the root of the operating system user account.
  2. From the main installation folder, navigate into the subdirectory, "extensions/openbb_platform_installer".
  3. Open, "pyproject.toml", in any text editor, and update line 21:
  • From: openbb-core = "^1"
  • To: openbb-core = ">=1.3.5"
  1. Save the file, close it, and then run the "Update" shortcut.

Supported Environments

The OpenBB Platform is installed within a Python virtual environment. It is compatible with versions of Python between 3.9 and 3.12, inclusively. The method for creating the environment will be a matter of user preference, from the command line - Conda, venv, etc. - or in a code editor and IDE - VS Code, PyCharm, Jupyter.

If you're interested in using the Docker container, skip ahead to the specific section below.

For those new to Python, this article shares some tips on getting started and why environments are important.

See this guide for creating a Python environment in VS Code.

With the environment created, and activated, begin the installation process.

Installation

Before installation, update the package manager so that pip is current, then create the environment with the desired version of Python.

note

Installing packages directly to the system Python or base environment is not recommended. Create a new environment first (can be any name, using openbb here for example).

conda create -n openbb python=3.12
conda activate openbb

PyPI

Details

Install from PyPI with:

pip install openbb

This will install the core OpenBB Platform, along with officially supported extensions and providers.

To install all extensions and providers (both officially supported and community maintained ones):

pip install openbb[all]
tip

In a macOS zsh Terminal shell, add quotation marks around the library name.

"openbb[all]"

From your python interpreter, import the OpenBB Platform:

from openbb import obb
warning

This import statement is required due to the statefulness of the obb package. There is currently no support for imports such as:

from openbb.obb.equity import *

When the package is imported, any installed extensions will be discovered, imported and available for use.

note

Currently if you wish to have the bare-bones openbb package with no extensions or providers, you can install with:

pip install openbb-core && pip install openbb --no-deps

To install single extensions:

pip install openbb-charting
pip install openbb-technical

Or install a single provider:

pip install openbb-yfinance

Providers are fully functional by themselves, but the interface routes are only added when the router extensions are installed.

pip install openbb-equity openbb-index openbb-derivatives

To update the package:

pip install --upgrade openbb

To update all extensions and providers:

pip install --upgrade openbb[all]

If you want to uninstall the package and all its dependencies:

pip uninstall openbb[all]

Docker

Details

We provide a platformAPI.Dockerfile on GitHub.

Run the following command from the repo root to build the image:

docker build -f build/docker/platformAPI.Dockerfile -t openbb-platform:latest .

To run it:

docker run -it --rm -p 6900:6900 -v ~/.openbb_platform:/root/.openbb_platform openbb-platform:latest

This will mount the local ~/.openbb_platform directory into the Docker container to use with the API keys and preferences from there, and it will expose the API on port 6900.

Source

To install from source, create a Python virtual environment and update pip and setuptools, within the newly created environment, before installing any packages.

Details

To build the OpenBB Platform from the source code, first install git:

pip install git

Next, clone the repository from GitHub:

git clone git@github.com:OpenBB-finance/OpenBB.git

When it is done, checkout the branch where the code is living:

git checkout develop

Then, cd into the directory:

cd openbb_platform

Install required packages

pip install poetry

Finally, run the developer installation script:

python dev_install.py
note

To install all extensions and providers, run: python dev_install.py -e

Post-Installation

With a fresh installation, and upon installing or uninstalling extensions, the Python interface needs to be built. This is done automatically, but can be manually triggered if required. Start a Python session and import openbb:

python
from openbb import obb

exit()

To manually trigger the build:

import openbb
openbb.build()

Restart the Python interpreter and then begin using the OpenBB Platform.

from openbb import obb

Start the REST API with:

uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload

See more information about using the REST API in the usage section

Hub Synchronization

Once you have installed the OpenBB Platform with the desired providers and extensions, you can synchronize with the OpenBB Hub. The main benefit of this is that you can use your single login to access your saved credentials and preferences from any instance. To login, you can use the login method, either using your email and password:

obb.account.login(email='my_email_here', password='my_password_here')

Or using your personal access token:

obb.account.login(pat='my_pat_here')