I created a GG v2 component and want to use the awsiot component inside a python file of the component.
So i added this script line to my recipe:
"Install":
{
"Script": "python3 -m pip install awsiot"
},
When i try to run the component the module installs just fine:
2021-05-13T09:13:06.470Z INFO (Copier) com.Componet.Test: stdout. Requirement already satisfied: awsiot in /home/ggc_user/.local/lib/python3.7/site-packages (0.1.3). {scriptName=services.com.Component.Test.lifecycle.Install.Script, serviceName=com.Component.Test, currentState=NEW}
But when i try to import the module the error occurs:
2021-05-13T09:13:07.125Z WARN (Copier) com.Component.Test: stderr. ModuleNotFoundError: No module named 'awsiot'. {scriptName=services.com.Component.Test.lifecycle.Run, serviceName=com.Component.Test, currentState=RUNNING}
I assume it has something to do with user privilegs. Is the python script not called by default with the user ggc_user specified in when installing the core device with the option --component-default-user ggc_user:ggc_group ?
Any advice would be appreciated.
Thanks,
Sebastian