This message was deleted.
# python
s
This message was deleted.
a
It sounds like a version issue. Which version of
pulumi_gcp
do you have installed (in your
venv
by default)?
t
pulumi_gcp-6.61.1.dist-info/ is in the venv that is enabled on my command line (and for the IDE) pulumi_gcp-6.59.0.dist-info/ is in the venv that is in the pulumi “project” directory … which I assume is what the pulumi binary uses.
Does Pulumi have a method/documentation to update the “project venv”?
@ancient-policeman-24615 ^^^^
a
I’m not aware of any pulumi specific way to manage installed python dependencies. You should be able to do whatever you would normally do to resolve this problem. I would run
./venv/bin/pip uninstall pulumi_gcp && ./venv/bin/pip install -r requirements.txt
, though Python experts might have a cleaner solution.
t
This is one area that Terraform beats Pulumi. 😞
Also, the requirements.txt file is not updated. Please add a feature that refreshes the project just like you can create a new one. Is this in Pulumi’s backlog?
d
You should set the IDE to use the same venv as pulumi. With vscode, you can add the folder to your workspace which allows for multiple python venvs. Jetbrains has similar functionality. While it's not built into pulumi, you can use a tool like
pur
to automate updating the requirements file: https://pypi.org/project/pur/
If you know you'll always run pulumi from inside a venv (ie, you activate it yourself), then you can remove the venv setting from
Pulumi.yaml
and the requirements.txt file. However I'd only recommend this if you have a way of managing the dependencies for the venv already