https://pulumi.com logo
#python
Title
# python
f

faint-table-42725

08/25/2020, 3:37 PM
The pulumi CLI/engine is different from the pulumi SDK. You
brew install pulumi
to obtain the CLI whereas
pulumi
in your requirements.txt refers to the Python-specific SDK. When you run
pulumi up
it spins up both the engine and a language host. The latter executes your python program within your specified python environment. The diagram in https://www.pulumi.com/docs/intro/concepts/how-pulumi-works/ provides a useful diagram and more details.
r

rhythmic-napkin-82334

08/25/2020, 4:55 PM
Thanks for the help! Then I still wonder, why
prefect_kubernetes
can not be imported, as it is installed in my conda environment, and if I understand the pulumi setup correctly, it should therefore be loaded from the conda environment, right? 🤔
f

faint-table-42725

08/25/2020, 5:30 PM
Are you executing
pulumi
from within the shell that has an active conda environment?
r

rhythmic-napkin-82334

08/26/2020, 7:56 AM
Yes, but it doesn’t seem to load the packages from the conda environment
So I installed pulumi-kubernetes in my main mac python (additional to the conda environment) and this workaround works, thus showing that the conda environment packages are not loaded when running pulumi up…
f

faint-table-42725

08/26/2020, 2:59 PM
Pulumi doesn’t try to do anything special from a python environment perspective. It picks up the first
python
on your
PATH
(see https://github.com/pulumi/pulumi/blob/b364296521a8b945ab37874f5c79de770d29d718/sdk/python/python.go#L32) If you’re able to provide a reliable repro of not using the right python (and right virtual environment), I’d be happy to take a look.