Home:ALL Converter>how to run google assistant sdk with sudo

how to run google assistant sdk with sudo

Ask Time:2018-03-30T02:34:58         Author:SyamsulMJ

Json Formatter

I'm having this problem where I need to run google assistant sdk with sudo command because I'm trying to integrate the action after receiving the instruction using Grovepi library from https://github.com/emutex/GrovePi .

Error I get if I didn't run with the google assistant sdk using sudo

```
(env) ubilinux@ubilinux4:~/assistant-sdk-python/google-assistant-sdk/googlesamples/assistant/library$ python project.py --device_model_id **************
Traceback (most recent call last):
  File "project.py", line 26, in <module>
    from grovepi import *
  File "/home/ubilinux/assistant-sdk-python/google-assistant-sdk/googlesamples/assistant/library/grovepi.py", line 98, in <module>
    import RPi.GPIO as GPIO
ImportError: No module named 'RPi'
```

and this is the error I get if i run the command with sudo

```
(env) ubilinux@ubilinux4:~/assistant-sdk-python/google-assistant-sdk/googlesamples/assistant/library$ sudo python project.py --device_model_id *****************************
[sudo] password for ubilinux: 
Traceback (most recent call last):
  File "project.py", line 23, in <module>
    import google.auth.transport.requests
ImportError: No module named google.auth.transport.requests
```

The project.py code is the same with the default hotwords.py source code but I just add up from grovepi import * inside the code to import the grovepi library.

Please help me :( Thanks in advance

Author:SyamsulMJ,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/49562929/how-to-run-google-assistant-sdk-with-sudo
yy