https://pulumi.com logo
Title
f

fast-grass-52071

09/15/2021, 4:24 PM
Hello guys, I am new to pulumi and I am trying to get datacenter ID from vSphere using python. but hitting the below error about the module. Any help is appreciated.
import pulumi_vsphere as vsphere
    ModuleNotFoundError: No module named 'pulumi_vsphere'
also installed pulumi-vsphere module using pip3. I am running this on mac
p

prehistoric-activity-61023

09/15/2021, 4:42 PM
did you install the module inside the pulumi venv?
by default pulumi create a venv but it does NOT install automatically dependencies inside it
source venv/bin/activate
pip install pulumi-vsphere

pulumi up
note: you don’t have to activate venv to run
pulumi up
as it automatically uses it (based on config from Pulumi.yaml project file) but it’s required to install depedencies
when you said you used
pip3
, I’m afraid you install this package globally on your machine and not inside the venv
f

fast-grass-52071

09/16/2021, 10:39 AM
Thank you @prehistoric-activity-61023 Yeah, I had it run globally but not on venv. It works now. 👍 🙂