Skip to content

Installation

You can install VectorBT with pip, the Python package manager, or with Docker.

With pip

pip install -U vectorbt

To install the optional Rust engine:

pip install -U "vectorbt[rust]"

To install all optional integrations (TA-Lib, Pandas TA, etc.):

pip install -U "vectorbt[full]"

To install all optional integrations together with the Rust engine:

pip install -U "vectorbt[full,rust]"

With Docker

You can pull the most recent Docker image if you have Docker installed.

docker run --rm -p 8888:8888 -v "$PWD":/home/jovyan/work polakowo/vectorbt:latest-full

This command pulls the latest polakowo/vectorbt:latest-full image from Docker Hub. It then starts a container running a Jupyter server and exposes it on host port 8888. Visiting http://127.0.0.1:8888/?token=<token> in a browser opens JupyterLab, where <token> is the secret token printed in the console.

Docker removes the container when the notebook server exits, but any files written to the working directory inside the container remain available in the working directory on the host (because the current directory is mounted into the container). See Jupyter Docker Stacks - Quick Start.

There are four types of images in polakowo/vectorbt: the vanilla version, the Rust-engine version, the full version (with optional integrations), and the full version with the Rust engine. To use another image, replace polakowo/vectorbt:latest-full with polakowo/vectorbt:latest, polakowo/vectorbt:latest-rust, or polakowo/vectorbt:latest-full-rust.

Each Docker image is based on jupyter/scipy-notebook and comes with a Jupyter environment, vectorbt, and other scientific packages installed.

Note

If you already have a Jupyter server running locally on port 8888, use another port, such as 10000:

docker run --rm -p 10000:8888 -v "$PWD":/home/jovyan/work polakowo/vectorbt:latest-full

Then open http://127.0.0.1:10000/?token=<token> in your browser (note the port change from 8888 to 10000).

With git

Of course, you can pull vectorbt directly from git:

git clone git@github.com:polakowo/vectorbt.git vectorbt

Install the package:

pip install -e vectorbt

Troubleshooting