This message was deleted.
# python
s
This message was deleted.
m
You can pass
-g
(short for
--generate-only
) to
pulumi new
to generate the project only. With that flag, it won’t create a stack, save config, or install dependencies. Alternatively, you can let
pulumi new
create the virtual environment, but then after it runs, delete the
venv
directory and modify the
Pulumi.yaml
file changing:
Copy code
runtime:
  name: python
  options:
    virtualenv: venv
To be just:
Copy code
runtime: python
f
Thanks Justin trying it out and hopefully that solves it all. What do you mean by 'create a stack' - the files necessary for the project? Is that not the same as generating the project?
m
What do you mean by ‘create a stack’
pulumi new
generates a project. By default,
pulumi new
also creates a new stack (internally running the equivalent of
pulumi stack init
). You can read more about the difference between a project and stack at https://www.pulumi.com/docs/intro/concepts/programming-model/#program-structure When
-g
is specified to
pulumi new
it won’t create the stack, so it’d be up to you to run
pulumi stack init
afterwards to create one.
w
For python developers who already have a preferred method of creating and maintaining python virtual environments, can we get an option for
pulumi new
to not create a virtual environment, but do everything else like it did before?