OctoBot developer installation
Setting up the recommended OctoBot development environment
This page is referring to OctoBot in versions superior to 0.4.0.
Download and install:
- We also use GitKraken to easily manage OctoBot's multiple repos, this is just a quality of life improvement and is not necessary.
- Download Visual Studio Build Tools and install "Desktop development with C++". It can be from 2019 or later.
.png?alt=media)
.png?alt=media)
- open a terminal in your project folder and execute the following commands to download the repos
git clone https://github.com/Drakkar-Software/OctoBot.git --branch dev
git clone https://github.com/Drakkar-Software/OctoBot-Tentacles.git --branch dev
git clone https://github.com/Drakkar-Software/OctoBot-Trading.git
git clone https://github.com/Drakkar-Software/OctoBot-Evaluators.git
git clone https://github.com/Drakkar-Software/OctoBot-Services.git
git clone https://github.com/Drakkar-Software/OctoBot-Backtesting.git
git clone https://github.com/Drakkar-Software/OctoBot-Tentacles-Manager.git
git clone https://github.com/Drakkar-Software/OctoBot-Commons.git
git clone https://github.com/Drakkar-Software/Async-Channel.git
git clone https://github.com/Drakkar-Software/trading-backend.git
- now you should have all the OctoBot repos in one folder
.png?alt=media)
- open each folder in GitKraken
.png?alt=media)
- add your project directory (the folder where all repo folders are located)
.png?alt=media)
- now add each folder
.png?alt=media)
- Now you have all repositories open as tabs and you can switch between git repositories and branches
- You can explore and switch to different branches by double-clicking on the branch name for each repository, or right click "reset to this commit".
.png?alt=media)
We recommend using PyCharm to navigate through the OctoBot projects. This IDE will allow you to open and navigate through the multiple OctoBot repositories and make your OctoBot run setup use the code directly from the cloned repos using the project dependencies.
- Open Pycharm and open the folder where all the OctoBot repositories are.
- 1.click on "<No interpreter>"
- 2.then click on "Add Interpreter..."
.png?alt=media)
- 1.select "Virtualenv Environment"
- 2.select the location of your venv. This should be your OctoBot project folder with "/venv" at the end
- 3.select your base interpreter and make sure its python 3.10 or 310
.png?alt=media)
- For each OctoBot's repository: install missing dependencies in requirements.txt and dev_requirements.txt
- To install these requirements on your PyCharm virtual environment, you can either:
- Manually go through each file listed in the commands below and install its requirements using the PyCharm requirements plugin
- In a new terminal, activate your the virtual environment create by PyCharm (venv directory) and then run the following commands
pip install -r OctoBot/requirements.txt
pip install -r OctoBot-Backtesting/requirements.txt
pip install -r OctoBot-Commons/requirements.txt
pip install -r OctoBot-evaluators/requirements.txt
pip install -r OctoBot-Services/requirements.txt
pip install -r OctoBot-Tentacles-Manager/requirements.txt
pip install -r OctoBot-Trading/requirements.txt
pip install -r Async-Channel/requirements.txt
pip install -r trading-backend/requirements.txt
pip install -r OctoBot-Backtesting/dev_requirements.txt
pip install -r OctoBot-Commons/dev_requirements.txt
pip install -r OctoBot-evaluators/dev_requirements.txt
pip install -r OctoBot-Services/dev_requirements.txt
pip install -r OctoBot-Tentacles-Manager/dev_requirements.txt
pip install -r OctoBot-Trading/dev_requirements.txt
pip install -r OctoBot-Trading/dev_requirements.txt
pip install -r trading-backend/dev_requirements.txt
Through the requirements you have also installed OctoBot packages related to the previously downloaded repositories. You must uninstall them or your python runner will use them instead of your local code version.
- remove OctoBot pip packages to use the packages from your project directory
pip uninstall -y OctoBot-Backtesting OctoBot-Trading Async-Channel OctoBot-Evaluators OctoBot-Commons OctoBot-Tentacles-Manager OctoBot-Services trading-backend
This will allow your PyCharm python runner to use your OctoBot repositories as source code directly. Thanks to this you will be able to edit any file in any repo and it will be taken into account in your other PyCharm run profiles runners from other open OctoBot repo. This is useful when running tests. If you skip this, you will need to install every OctoBot module with pip and won't be able to edit their code.
- In File/Settings/Project/Python Dependencies: For each repository: check its required OctoBot repository dependency.
Go to File -> Settings and add your OctoBot module folders as a project source
Create PyCharm run configurations using the previously created virtual env (with all the dependencies installed) for each way you want to start python commands (running OctoBot, running tests, etc).
Here we explain how to setup and run two scripts for OctoBot, but there are way more you can set up by yourself, explore the rest of the docs to find out more commands
this script will run OctoBot and apply all changes made to all repositories except the OctoBot-Tentacles folder (see install OctoBot-Tentacles and run OctoBot script)
- click on Add Configuration
.png?alt=media)
now add a new python script

- You can now run and debug the whole OctoBot project and its repositories by clicking on the play button, or on the debugging button to run the debugger

this script will install the OctoBot-Tentacles folder and run Octobot with all your changes applied from all repositories.
- **Script to create an installable OctoBot-Tentacles package **
.png?alt=media)
- Script to install OctoBot-Tentacles package
.png?alt=media)
- Script to zip, install and run in one go
.png?alt=media)
Open the OctoBot Project root folder with VS Code
depending your system instead of "python" you might need to use "python3.10" or "python310" . Especially if you have multiple versions of python installed it's important to use the right version
python -m venv venv
on Windows:
.\venv\Scripts\activate
on Debian/Ubuntu:
source venv/bin/activate

The VS Code launch config is located in project-folder/.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Start OctoBot",
"type": "python",
"request": "launch",
"env": {
"PYTHONPATH": "${workspaceFolder}/Async-Channel;${workspaceFolder}/OctoBot-Tentacles-Manager;${workspaceFolder}/OctoBot-Commons;${workspaceFolder}/OctoBot-Trading;${workspaceFolder}/OctoBot-Backtesting;${workspaceFolder}/OctoBot-evaluators;${workspaceFolder}/OctoBot-Services"
},
"program": "start.py",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/OctoBot",
"args": [""],
"justMyCode": true
}
]
}
The VS Code settings.json is located in project-folder/.vscode/settings.json
{
"python.analysis.extraPaths": [
"./OctoBot",
"./Async-Channel",
"./OctoBot-Backtesting",
"./OctoBot-Commons",
"./OctoBot-Services",
"./OctoBot-evaluators",
"./OctoBot-Trading",
"./OctoBot-Tentacles-Manager",
]
}
- For each OctoBot's repository: install missing dependencies in requirements.txt and dev_requirements.txt
pip install -r OctoBot/requirements.txt
pip install -r OctoBot-Backtesting/requirements.txt
pip install -r OctoBot-Commons/requirements.txt
pip install -r OctoBot-evaluators/requirements.txt
pip install -r OctoBot-Services/requirements.txt
pip install -r OctoBot-Tentacles-Manager/requirements.txt
pip install -r OctoBot-Trading/requirements.txt
pip install -r Async-Channel/requirements.txt
pip install -r OctoBot-Backtesting/dev_requirements.txt
pip install -r OctoBot-Commons/dev_requirements.txt
pip install -r OctoBot-evaluators/dev_requirements.txt
pip install -r OctoBot-Services/dev_requirements.txt
pip install -r OctoBot-Tentacles-Manager/dev_requirements.txt
pip install -r OctoBot-Trading/dev_requirements.txt
pip install -r OctoBot/dev_requirements.txt
Through the requirements you have also installed OctoBot packages related to the previously downloaded repositories. You must uninstall them or your python runner will use them instead of your local code version.
- remove OctoBot pip packages to use the packages from your project directory
pip uninstall -y OctoBot-Backtesting OctoBot-Trading Async-Channel OctoBot-Evaluators OctoBot-Commons OctoBot-Tentacles-Manager OctoBot-Services
Press F5 on your keybord to start OctoBot
Last modified 15d ago