https://pulumi.com logo
f

few-elephant-12795

07/11/2023, 1:08 PM
Hi all, I'm working with Pulumi python on GCP and when running
import pulumi_random
I get a
No module named 'pulumi_random'
error. (I also ran
pip install pulumi-random
prior to the import)
l

limited-rainbow-51650

07/11/2023, 1:39 PM
@few-elephant-12795 can you verify if you ran
pip install
while the virtualenv was active? It might that you installed the
random
package in another venv. Talking from experience here. :-)
f

few-elephant-12795

09/21/2023, 12:45 PM
lost track of this, in case it's relevant for other ppl: The issue at my end was a wrong configuration for the virtual environment (
.env
instead of
env
)
l

limited-rainbow-51650

09/22/2023, 7:49 AM
You can always configure in the
Pulumi.yaml
file where your virtual environment lives. See the virtualenv setting here: https://www.pulumi.com/docs/concepts/projects/project-file/