I need some help here: My code snippet is below, ...
# python
c
I need some help here: My code snippet is below, from pulumi website:
Copy code
"""A Python Pulumi program"""

import pulumi
from pulumi_azure_native import storage
from pulumi_azure_native import resources

resource_group = resources.ResourceGroup("aa-msdn-rg-pulumi")
account = storage.StorageAccount('sa',
    resource_group_name = resource_group.name,
    sku = storage.SkuArgs(
        name = storage.SkuArgs.STANDARD_LRS,
        ),
        kind = storage.kind.STORAGE_V2)

primary_key = storage.list_storage_account_keys_output(
    resource_group_name = resource_group.name,
    account_name = account.name
    ).accountKeys.keys[0].value

pulumi.export("primary_storage_key",primary_keycdpu)
I get error as below:
Copy code
File "C:\OnlyOnMyPC\my-training\awesomeazure\.\__main__.py", line 4, in <module>
        from pulumi_azure_native import storage
    ModuleNotFoundError: No module named 'pulumi_azure_native'
    error: an unhandled error occurred: Program exited with non-zero exit code: 1
Yes and I have installed the package as well but still no luck ?
Copy code
PS C:\OnlyOnMyPC\my-training\awesomeazure> pip install pulumi_azure_native
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pulumi_azure_native in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (1.62.0)
Requirement already satisfied: parver>=0.2.1 in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (from pulumi_azure_native) (0.3.1)
Requirement already satisfied: pulumi<4.0.0,>=3.0.0 in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (from pulumi_azure_native) (3.28.0)
Requirement already satisfied: semver>=2.8.1 in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (from pulumi_azure_native) (2.13.0)
Requirement already satisfied: attrs>=19.2 in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (from parver>=0.2.1->pulumi_azure_native) (21.4.0)
Requirement already satisfied: six~=1.13 in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (from parver>=0.2.1->pulumi_azure_native) (1.16.0)
Requirement already satisfied: arpeggio~=1.7 in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (from parver>=0.2.1->pulumi_azure_native) (1.10.2)
Requirement already satisfied: pyyaml>=5.3.1 in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (from pulumi<4.0.0,>=3.0.0->pulumi_azure_native) (6.0)
Requirement already satisfied: protobuf>=3.6.0 in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (from pulumi<4.0.0,>=3.0.0->pulumi_azure_native) (3.20.0)
Requirement already satisfied: dill>=0.3.0 in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (from pulumi<4.0.0,>=3.0.0->pulumi_azure_native) (0.3.4)
Requirement already satisfied: grpcio<1.44.0,>=1.33.2 in c:\users\aagashe002\appdata\roaming\python\python310\site-packages (from pulumi<4.0.0,>=3.0.0->pulumi_azure_native) (1.43.0)
My Python path is already in Environment variable: ``````
b
@calm-megabyte-11174 you need to install it inside the virtualenv
c
@billowy-army-68599 Apologies for the silly question but how do I do that?
Not that difficult. It seems there is already a folder vnev, I went in there and ran activate command and then pip install command.
It's running now, once done I would come to awesomeazure folder and run pulumi up?
Yep, worked well. Thanks @billowy-army-68599 for your help 🙂