https://pulumi.com logo
#general
Title
# general
w

wonderful-motherboard-40477

12/09/2023, 9:14 AM
👋 Hi everyone! I I have a question about Python venv, when running
pulumi new python
in a new project, the command automatically creates
venv
folder, and installs all the requirements. Is there anyway to specify a custom venv folder instead of the default one ? Say I need to set it to
.venv
. I know how to alter it after running the command, what I need is to alter it before or during the command. Thanks
a

adorable-house-61348

12/12/2023, 11:06 AM
I believe the docs here might be what you are looking for
w

wonderful-motherboard-40477

12/12/2023, 12:32 PM
Thanks for the doc, but it's not good, the doc describes exactly what I encountered,
pulumi new python
creates automatically
venv
and install all the dependencies, and we can only alter it after all the installation which is too late. I created this issue on their repo.
a

adorable-house-61348

12/12/2023, 3:54 PM
I believe you can disable the behaviour or change the directory in the pulumi config:
Copy code
This behavior is controlled by the following virtualenv runtime option in Pulumi.yaml:

runtime:
  name: python
  options:
    virtualenv: venv
virtualenv is the path to a virtual environment to use.
Is this not what you want? I might have misunderstood your problem
oh, I see what you mean - you want the different behaviour for
pulumi new
. I'm afraid that's not possible right now. Thanks for raising the issue!
w

wonderful-motherboard-40477

12/12/2023, 3:57 PM
yes, not possible for the moment, as the config file
Pulumi.yaml
is generated by
pulumi new
too. I got an update from a pulumi maintainer in above issue, maybe it will be possible soon.