    def python_packages(self, *packages: str) -> t.Self:
        """Add python dependencies to the image. Supports chaining call.

        Example:

        .. code-block:: python

            image = Image("debian:latest")\
                .python_packages("numpy", "pandas")\
                .requirements_file("requirements.txt")
        """
        if not packages:
            raise BentoMLConfigException("No packages provided")
        self.python_requirements += "\n".join(packages) + "\n"
        self._after_pip_install = True
        return self
Add python dependencies to the image. Supports chaining call.

Example:

.. code-block:: python

image = Image("debian:latest")\
.python_packages("numpy", "pandas")\
.requirements_file("requirements.txt")
src/_bentoml_sdk/images.py