0

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

SyamsulMJ
  • 39
  • 2
  • Did u install either of the modules that errored? – Michael Ilie Mar 29 '18 at 18:36
  • I’m sorry but I didn’t quite understand your question. But from what i understand from your question, both modules work if I run it seperately. Meaning if i only run the google assistant sdk without importing grovepi library it work and if i use grovepi library with my other code it with “sudo” command it’s also working. – SyamsulMJ Mar 29 '18 at 20:15
  • No but its saying that the modules werent installed. Did you install them? – Michael Ilie Mar 29 '18 at 20:29
  • Have you run `pip install -r requirements.txt`? – Nick Felker Mar 29 '18 at 21:24
  • I have found the solution where I just need to re-install the google-assistant sdk with a sudo command. Then only I can use the grovepi library with it. This is because the grovepi library need to be run with `sudo` command. Hopefully it helps. Thanks – SyamsulMJ Sep 02 '18 at 16:49

0 Answers0