Your code runs in the platform's Python base image. When you need more than it has, list the packages under Requirements. The first test run installs them, and saving reuses that install, so the version you save runs with exactly the packages you tested.
What is already installed
Python 3.11 with numpy, pyarrow, pydantic, pyyaml, jsonschema, imageio-ffmpeg (with ffmpeg) and mcap, plus the embodiflow runtime. You don't list these.
Add a requirement
List the package
In the editor, scroll the right-hand panels to Requirements and type one pip requirement per line, for example opencv-python-headless==4.10.0.84. At most 50. The list is kept in the code as requirements=[...] of the decorator; editing either one changes both. Pin exact versions, so a later install gets the same files.
Run a test
Choose Run test. Before your code runs, the panel shows Installing packages, first Waiting for a build slot, then the time spent; Show install log opens pip's output. When the packages are in, it says "Packages installed, starting the run." and the test runs as usual. The same list installs only once; later tests start right away.
Save the version
Choose Save version. The version uses the image the test built. The algorithm's page shows its Image build: Waiting for a build worker, Building the image, then Image built. A version without requirements reads "No build needed: this version has no extra requirements." A first build can take about 10 minutes while dependencies are downloaded; a workflow can use the version once its image is built.
When an install fails
| You see | Why | What to do |
|---|---|---|
| Installing the packages failed with the last lines of the install log | pip could not install a requirement: a wrong name or version, or a package without a binary wheel for Linux. Nothing is compiled from source. | Fix the line in Requirements and run again. |
| "The install stopped before pip ran, so your requirements are not the cause." | The build job itself did not start. | Run again. If it repeats, ask your administrator to check the build jobs. |
| "The build could not download your code from storage." | A platform problem, not your requirements. | Run again. If it repeats, ask your administrator. |
| "The install could not reach the package index" | The build has no route to the package index. | Run again later, or ask your administrator to check the network. |
| Packages cannot be installed here | This deployment doesn't build images, so only the base image's packages exist. | Remove the requirements, or test locally with the CLI. |
| Build failed on the algorithm page | The saved version's image did not build; its Reason says why. | Open build log, fix, and save again, or Retry build for a passing problem. |
From the terminal
ef algorithm test installs the decorator's requirements into the Python environment the CLI manages for your deployment, so local runs match the cloud. Behind a proxy, set PIP_INDEX_URL. ef algorithm save <dir> --wait saves the version and follows its image build, printing the log until it ends.
ef algorithm save motion-check --wait