I'm having a hard time getting my pulumi program t...
# python
s
I'm having a hard time getting my pulumi program to recognized that I have
pulumi_docker
installed on my system. I have the following in my programs requirements.txt:
Copy code
pulumi>=3.0.0,<4.0.0
pulumi_docker>=3.0.0,<4.0.0
pulumi-aws>=4.0.0,<5.0.0
pylint>=2.7.4
And at the top of my program's main.py I have:
Copy code
from pulumi_aws import ecr
from pulumi_docker import Image, DockerBuild
I'm not sure why
pulumi_aws
works, but
pulumi_docker
does not. Any chance you all could help resolve this error:
Copy code
ModuleNotFoundError: No module named 'pulumi_docker'
b
hi Elena, every time I've seen this it's because the module isn't installed in the virtualenv. Can you makre sure it's activated?
Copy code
source venv/bin/activate
pip3 install pulumi_docker`
Pulumi automatically creates a venv for you when you create a new project
s
I have the package installed in the virtualenv, but still no luck
b
can you share your
Pulumi.yaml
?
s
I'm uninstalling everything and reinstalling to see if I can get in a state where
pulumi_aws
and
pulumi_docker
but I'm still having the same issue.
Here's my Pulumi.yaml
Copy code
name: ecr
runtime:
  name: python
  options:
    virtualenv: venv
description: ECR repos
b
huh, how very curious. Which OS?
s
b
would you be open to screen sharing so we can figure it out? I'm free after lunch PST
s
sure! that would be great!
also, I really enjoyed the "Build a Self-Service Infrastructure Platform with Python" workshop you led last week. Thank you so much for that
b
my pleasure! can you DM me an email and I'll send you a zoom link
1
s
The solution here was removing my venv folder and recreating it with
$ python3 -m venv venv
❤️ 1