Skip to main content

Source

warning

The instructons on this page are for installing the OpenBB Terminal from the source code, which uses a legacy version of the Python SDK. If you do not wish to install the OpenBB Terminal application, please refer to the installation instructions here

This section provides steps to install the OpenBB Terminal and SDK from source. This installation type supports Windows, macOS and Linux systems. Before starting the installation process, make sure the following pieces of software are installed.

Details

Miniconda Miniconda is a Python environment and package manager. It is required for installing certain dependencies.

Go here to find the download for your operating system or use the links below:

To verify if Miniconda is installed on the system, open the command line and run the following command:

conda --version

If Miniconda is installed, a version number will be displayed, for example:

conda 23.1.0

There is a good chance the version of Conda is not current. Update it with the command below:

conda update -n base -c conda-forge conda
Git

Check to verify if Git is installed by running the following command:

git --version

Which will print something like this:

git version 2.31.1

If Git is not installed, install it now from conda by running:

conda install git

Or follow the instructions here to install it.

Microsoft C++ Build Tools (Windows only)

Use the instructions here to install or update Microsoft C++ Build Tools.

image

image

Rosetta2 (Apple Silicon only)

Install Rosetta from the terminal with:

softwareupdate --install-rosetta
LibOMP (Apple Silicon only)

Apple Silicon does not ship libomp by default. It will need to be installed manually for some features of the ML toolkit to work. The libomp library can be installed from homebrew.

Check if Homebrew is installed by running the following command:

brew --version

If Homebrew is not installed, install it by running:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Or follow the instructions here.

To install LibOMP, run the following command:

brew install libomp
VcXsrv (Windows Subsystem for Linux only)

Since a WSL installation is headless by default (i.e., there is only access to a terminal running a Linux distribution) there are additional steps required to display visualizations. A more detailed tutorial is found, here.

  • Dynamically export the DISPLAY environment variable in WSL2:
# add to the end of ~/.bashrc file
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
# source the file
source ~/.bashrc
  • Download and install VcXsrv
  • When running the program is important to check "Disable access control"

After this, VcXsrv should be running successfully, and the machine is ready to proceed with the terminal installation.

Alternatives to VcXsrv include:

GTK toolchains (Linux only)

GTK is a window extension that is used to display interactive charts and tables. The library responsible for interactive charts and tables (pywry) requires certain dependencies, based on the Linux distribution, to be installed first.

Debian-based / Ubuntu / Mint
sudo apt install libwebkit2gtk-4.0-dev
Arch Linux / Manjaro
sudo pacman -S webkit2gtk
Fedora
sudo dnf install gtk3-devel webkit2gtk3-devel

Proceed to next steps once the requirements above have been met.

Clone the Source Code

Clone the OpenBB Terminal source code from GitHub. This will download the source code to the current working directory.

git clone https://github.com/OpenBB-finance/OpenBBTerminal.git

Enter the directory:

cd OpenBBTerminal

Create and Activate the Virtual Environment

Create the environment by copying the code below into the command line and agreeing to the prompts.

conda env create -n obb --file build/conda/conda-3-9-env.yaml
note

Additional YAML files provide support for Python versions 3.8 and 3.10. Substitute the 9, in the command above, with the desired version.

After the obb environment is created, activate it by entering:

conda activate obb
note

When the new environment is activated for the first time, it is required to clean up some artifacts in order for all dependencies to work nicely.

On macOS and Linux do this by running this script (copy and paste the launch code):

build/conda/cleanup_artifacts.sh

On Windows do this by running this script (copy and paste the launch code):

build\conda\cleanup_artifacts.bat

Install the OpenBB Terminal

Make sure to have completed all previous steps. If followed, the current working directory will be the location where the OpenBB Terminal source code lives.

Install the remaining dependencies and the terminal through Poetry, a package manager.

poetry install -E all
info
Read about Conda, Poetry and Python package management

For the best user experience we advise using conda and poetry for environment setup and dependency management. Conda ships binaries for packages like numpy so these dependencies are not built from source locally by pip. Poetry solves the dependency tree in a way that the dependencies of dependencies of dependencies use versions that are compatible with each other.

For Conda environments, the build/conda folder contains multiple .yaml configuration files to choose from.

When using other Python distributions we highly recommend a virtual environment like virtualenv or pyenv for installing the terminal dependency libraries.

For people who prefer using "vanilla" pip the requirements files are found in the project root:

  • requirements.txt list main dependencies
  • requirements-full.txt list all the dependencies including Machine Learning and Portfolio Optimization libraries and dependencies for developers

They can be installed with pip:

pip install -r requirements.txt

The dependency tree is solved by poetry.

Note: The libraries specified in the requirements files have been tested and work for the purpose of this project, however, these may be older versions. Hence, it is recommended for the user to set up a Python virtual environment prior to installing them. This keeps dependencies required by different projects in separate places.

After installing the requirements, install the terminal with:

pip install .

Once this installation process is completed, start the terminal by running:

python terminal.py

NOTE: When the OpenBB Terminal is opened next, the Python environment will need to be activated again. When using a code editor, make sure that the correct environment is selected. This should be easy to figure out if there is an error stating that there are missing packages. To launch the OpenBB Terminal application in a new terminal window, first navigate into the folder where the source code was cloned, and then use the following two commands:

conda activate obb
python terminal.py

TROUBLESHOOTING: Having difficulty getting through the installation, or encountering errors? Reach out to our Discord community for help.