Files
OpenBB/website/content/sdk/installation.md
jose-donato 9211a8595c Update documentation with more detailed installation instructions, requirements and more (#4382)
* fix: changed button styles

* Make Rosetta requirements more clear

* Update installation instructions

* Add seperation

* Update windows.md

* Update installation docs

* fix country choices (#4403)

* Hotfix/plotsbackend start (#4404)

* readd removed plots_backend().start() from merged PR

* Update backend.py

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>

* Update helper_classes.py (#4378)

Co-authored-by: James Maslek <jmaslek11@gmail.com>

* Add improvements to the website

* Fix keys wrong redirect

* Update installation

* Update requirements

* move things around

* Restructure everything

* Details

* fix: mac issue and redirect installation

* fix: mac macos

* Remove installation .md and make it dropdown

* Update installation of SDK

* Grammar

---------

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: teh_coderer <me@tehcoderer.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-03-09 17:05:10 +00:00

6.1 KiB
Vendored

title, sidebar_position, description, keywords
title sidebar_position description keywords
Installation 2 The OpenBB SDK provides programmatic access to all Terminal functions. This layer of code allows users to build their own tools and applications on top of the existing architecture. Follow these steps to install on a local machine.
installation
installer
install
guide
mac
windows
linux
python
github
macos
how to
explanation
openbb
sdk
api
pip
pypi

The OpenBB SDK provides programmatic access to all Terminal functions. This layer of code allows users to build their own tools and applications on top of the existing architecture. Follow these steps to install on a local machine. If the OpenBB Terminal has already been installed in a virtual Python environment, no additional installations are required.

Minimum Requirements
  • Windows 10,
  • Modern CPU (made in the last 5 years)
  • At least 4GB of RAM
  • At least 5GB of free storage
  • Internet connection (cable or 4G mobile)

Before continuing with the installation process, make sure the following software is installed:

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:

NOTE for Apple Silicon Users: Install Rosetta from the command line: softwareupdate --install-rosetta

NOTE for Windows users: Install/update Microsoft C++ Build Tools from here.

CMake (Mac and Linux only)

If you have a MacBook, check if homebrew is installed by running brew --version

If Homebrew is not installed, run:

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

If Homebrew is already installed:

brew install cmake
brew install gcc

If you have a Linux computer, use the following script:

sudo apt update && sudo apt upgrade
sudo apt install -y gcc cmake

Create Python Environment

The first step is to create the virtual Python environment. When a terminal window is opened, if the base Conda environment - look for (base) to the left of the cursor on the command line - is not activated automatically, find the path for it by entering:

conda env list

Copy the path which corresponds with base, and activate it with:

conda activate REPLACE_WITH_PATH

Check which conda version is installed by entering:

conda -V

As of writing, the most recent version of Conda is, 23.1.0. If required, update from a lower version with:

conda install -c conda-forge -n base conda=23.1.0

Create the environment by copying the code below into the command line:

conda create -n obb -c conda-forge python=3.10.9 pip pybind11 cmake git cvxpy lightgbm poetry

Activate the Environment

After the packages from Step 2 install, activate the newly created environment by entering:

conda activate obb

Install the OpenBB SDK

There are two methods to install the OpenBB SDK. The easiest way is to use PyPi as it requires a single command to be ran. If you would also be looking to make code edits, it can be beneficial to clone the repository.

Install From PyPi

Inside any terminal run the following:

pip install "openbb[all]"

That's it! The OpenBB SDK can now be imported to any Python session with the line of code below.

from openbb_terminal.sdk import openbb

The OpenBB Terminal is part of the installation, and the application can be launched from the command line by entering:

openbb

Install via Git Clone

From your code editor or command line, browse to the location the OpenBB Terminal source code should live. Make sure you have completed the previous steps.

This starts by cloning the GitHub repository. This will download the source code to the current working directory.

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

Then, navigate to this folder. This can be done in command line or through the code editor by opening the folder.

cd OpenBBTerminal

There are a few packages that required to be installed. This is done through Poetry, a package manager.

pip install qdldl==0.1.5.post3
poetry install -E all

Done! The OpenBB SDK can now be imported to any Python session with the line of code below.

from openbb_terminal.sdk import openbb

The Terminal application is also installed, and it can be launched from the command line at the root OpenBBTerminal folder with:

python terminal.py

Updating the OpenBB SDK Version

To upgrade the OpenBB SDK to the latest version via pypi, with the obb Python environment active, enter:

pip install -U openbb[all]

To update the OpenBB SDK via the Git Clone method with the obb Python environment activated, navigate into the root folder of the cloned project. Then, pull the changes from GitHub:

git fetch
git pull

Note: If working from a forked repo, the git pull command will need to be adjusted to pull from the desired branch, like origin or upstream. For example, git pull origin main; git pull origin develop

Update any changes to the dependencies by running:

poetry install -E all