Documentation

Dependencies

QuantCraft runs your strategy code in a dedicated Python environment used only for the IDE: Run / Test, Format Document, and package install/remove all use that same interpreter and its libraries.

This page explains how that environment works and how to add or remove Python packages from it.

QuantCraft IDE with the Packages menu and Add Package dialog open, listing installed packages such as alpaca-py, pandas, and numpy with version numbers.


The environment (what you’re managing)

  • Single IDE environment — There is one QuantCraft IDE Python environment per machine (the one the app’s Python backend uses). It is not tied to a specific workspace folder on disk; every project and every open file shares this environment when you run or test code.
  • Same packages everywhere — If you install pandas here, any script you run from the IDE can import pandas, regardless of which workspace folder your .py files live in.
  • Backend required — Installing or removing packages talks to the QuantCraft Python backend. If the backend is not running or not reachable, those actions will fail (you may still see a cached list of packages until the app can refresh it).
  • What’s already there — QuantCraft ships with a base set of packages needed for the IDE (strategy APIs, plotting, brokers, formatting, and so on). Those appear in the package list together with anything you add. You should treat the base set as part of the product; removing something the IDE relies on can break Run, Test, or Format Document.

Viewing installed packages

  1. In the IDE editor toolbar, open Packages.
  2. Below Add Package, you’ll see a scrollable list of installed distributions.

Each row shows the package name and, when available, its installed version. The list is meant to reflect top-level installs (what you or the product installed directly), not every transitive dependency hidden inside another library.


Adding a Python package

  1. Open Packages in the editor toolbar.
  2. Click Add Package.
  3. In the dialog, enter a PyPI distribution name — for example pandas or numpy — using only letters, digits, dots, hyphens, and underscores (one name per install; version pins like pandas==2.2.0 are not accepted in this field).
  4. Click Add. The app runs pip install in the IDE environment. This can take a while for large packages.
  5. On success, the dialog closes and the new package appears in the list. You can import it in your scripts immediately after a successful install.

If install fails

  • The dialog may show an error under the field.
  • A message is also written to the Output panel at the bottom (in red).
  • Typical causes: typo in the name, package not on PyPI, network or proxy issues, or incompatible Python version for that package.

Removing a Python package

  1. Open Packages in the editor toolbar.
  2. Find the package in the list.
  3. Click the remove (×) control on that row.
  4. Read the confirmation text — uninstall is performed with pip uninstall and cannot be undone from the UI.
  5. Confirm Remove.

If removal fails

  • The app may show an alert with the server error.
  • Do not remove packages you did not add unless you understand the impact; uninstalling a dependency of the IDE or of another listed package can leave the environment in a broken state until you reinstall what you need.

After a successful add or remove, the editor’s autocomplete index is refreshed so import suggestions and member completion match what is actually installed.


Relationship to your workspace files

  • Workspace folders hold your .py files, folders, and saved workspace data — they do not replace the IDE’s Python environment.
  • Dependencies are global to the IDE environment on that machine, not “per folder” in the Packages UI.
  • For import completion, the editor also suggests your workspace modules (for example files inside a folder you created). That is separate from PyPI packages but appears in the same editing flow.

Quick reference

GoalWhere to go
See what’s installedPackages menu (editor toolbar)
Install from PyPIPackagesAdd Package → enter name → Add
UninstallPackages× on the row → confirm Remove
Diagnose install errorsOutput panel + message in the Add Package dialog

Tips

  • Prefer adding the smallest set of libraries your strategy needs; large stacks slow down installs and upgrades.
  • After changing packages, if something odd happens in Run or Test, check the Output panel for import or pip-related errors.
  • Keep using Format Document and the editor as usual; they use the same environment as Run and Test.