alan-turing-institute / data-safe-haven

https://data-safe-haven.readthedocs.io
BSD 3-Clause "New" or "Revised" License
61 stars 15 forks source link

Pulumi using wrong Python/Python path in pipx install #2239

Closed JimMadge closed 1 month ago

JimMadge commented 1 month ago

:white_check_mark: Checklist

:computer: System information

:package: Packages

List of packages ```none Paste list of packages here ```

:no_entry_sign: Describe the problem

After pipx install, when calling dsh Pulumi will look for a Python interpreter and find system Python, not the Python venv with all of the dependencies. It will fail because of missing packages.

On option to fix, can declare venv path in Pulumi package settings. We set these here

:deciduous_tree: Log messages

Relevant log messages ```none Your log details here ```

:recycle: To reproduce

craddm commented 1 month ago

There is an environment variable we can set to tell Pulumi to use a specific python version: PULUMI_PYTHON_CMD - see https://www.pulumi.com/docs/iac/cli/environment-variables/