How set up environment to use the python API

Hi,

I’m going through the morpheus developer guide to learn how to use the Python API to create a pipeline.

I’ve created a basic pipeline, but i can’t run it in the developer container.

I built the container using Morpheus/docker/build_container_dev.sh at branch-25.06 · nv-morpheus/Morpheus · GitHub

Then use this cmd to run it on a nvidia brev gpu instance

docker run --rm -it --runtime=nvidia --gpus=all
–net=host
-v /var/run/docker.sock:/var/run/docker.sock
-v $(pwd):/workspace
-v /ephemeral:/ephemeral
–entrypoint /bin/bash
morpheus:dev-250521-amd64

Inside the container the morpheus python package isn’t available.

python -c “from morpheus.pipeline import LinearPipeline; print(‘✅ Morpheus Python SDK is working’)”
Traceback (most recent call last):
File “”, line 1, in
ModuleNotFoundError: No module named ‘morpheus.pipeline’

python -c “from morpheus.pipeline import LinearPipeline; print(‘✅ Morpheus Python SDK is working’)”
Traceback (most recent call last):
File “”, line 1, in
File “/workspace/Morpheus/python/morpheus/morpheus/pipeline/init.py”, line 36, in
from morpheus.pipeline.preallocator_mixin import PreallocatorMixin
File “/workspace/Morpheus/python/morpheus/morpheus/pipeline/preallocator_mixin.py”, line 25, in
from morpheus.common import TypeId
File “/workspace/Morpheus/python/morpheus/morpheus/common/init.py”, line 18, in
from morpheus._lib.common import FiberQueue

I’ve tried installing Morpheus/python/morpheus at branch-25.06 · nv-morpheus/Morpheus · GitHub with pip install -e .

Is there any documentation for setting up the environment so I can run pipelines using the Python API?

i’m using git branch-25.06

Thanks!

needed to check out the latest release on git then morpheus compiled.

Thanks for letting us know that you were able to resolve this.

Best,

Sophie

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.