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

thankful-stone-34269

02/07/2023, 10:54 PM
When I check out a colleague's pulumi code that I haven't worked on before, how do I get pulumi to rebuild the
venv
directory for me?
c

creamy-agency-52831

02/07/2023, 10:56 PM
Simply running
pulumi preview
should do the trick 🙂
t

thankful-stone-34269

02/07/2023, 11:01 PM
Well, that does make the
venv
dir for me, but I still get
ModuleNotFoundError: No module named 'pulumi'
Should
Pulumi.yaml
excplicitly point to the runtime in the venv? I have
Copy code
runtime:
    name: python
    options:
        virtualenv: venv
I guess I have to manually
venv/bin/pip install pulumi pulumi_aws
?
Yeah that seems to do it.
e

echoing-dinner-19531

02/08/2023, 9:48 AM
yeh pulumi will use the venv if the option is set, but doesn't currently try to build the venv. Normally you'll want a requirements.txt file in the repo so you can give that to pip to install with
pip install -r requirement.txt