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

gray-tailor-20387

05/12/2020, 9:41 AM
Hey everyone, I tried adding the pulumi-docker package to my existing python project: added following line to requirements.txt:
pulumi-docker>=2.0.0,<3.0.0
Then I installed requirements:
pip3 install -r requirements.txt
It seemed to find and install the package fine, and
pip3 list
shows "pulumi-docker 2.1.0" but now when i try to use
import pulumi_docker as dock
I get following error:
ModuleNotFoundError: No module named 'pulumi_docker'
I feel like I'm missing something stupid, does anyone know what? edit: I work in a venv like the website suggested
b

bland-lamp-16797

05/12/2020, 11:23 AM
if
python3 -c "import pulumi_docker as dock"
does not work, your venv is not configured well... try to reinstall venv and check if you have python2 mixed with old pip.
g

gray-tailor-20387

05/12/2020, 12:01 PM
@bland-lamp-16797 thank you very much! will try this after work hours
g

gentle-diamond-70147

05/12/2020, 3:36 PM
I believe we don't currently support the
pulumi-docker
package in Python. https://github.com/pulumi/pulumi-docker/issues/164
g

gray-tailor-20387

05/12/2020, 7:58 PM
@gentle-diamond-70147 well darnit, thanks for letting me know
It was a problem with my venv after all, the github issue concerns specifically "Docker Image build"
g

gentle-diamond-70147

05/12/2020, 9:28 PM
Ah, apologies for the misdirection!