Skip to content

Feature Request: Support python package installation somehow #66

Closed
@raman325

Description

@raman325

I love that pyscript lets you import any package to use in automations, but I am somewhat limited in the packages I can use because I run HomeAssistant in a Docker container, and I would have to either manually install the packages each time I rebuilt the container or create my own Dockerfile that did the same. It would be great if there was a mechanism through pyscript to install packages if they are not found. I am not sure what the best way to achieve this would be, there are two problems to consider:

  1. How to determine what packages need to be installed and their versions? HomeAssistant achieves this through the use of manifest.json which lists the dependent package and version.
  2. How to install the package? You can probably use the code here as a reference https://github.com/home-assistant/core/blob/dev/homeassistant/requirements.py#L105

Open questions:

  1. How would pyscript deal with version mismatches between what HomeAssistant expects and what pyscript wants? My take is that we should always defer to HomeAssistant requirements to prevent issues with the core application

Thanks for the consideration!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions