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
Related
I am following Raspberry Pi with Python but i am getting errors when trying to execute "app.py".
I first run command as follows:
sudo chmod u+x setup.sh
sudo ./setup.sh
Next
python app.py 'HostName=xxxx.azure-devices.net;DeviceId=device1;SharedAccessKey=GMMxxxxxxxxxxxxxxxxxxxxxxxxB5o='
so it should use by default python. but got an error as follows
Traceback (most recent call last):
File "app.py", line 10, in <module>
from iothub_client import IoTHubClient, IoTHubClientError,
IoTHubTransportProvider, IoTHubClientResult
ImportError: No module named iothub_client
Next, I tired everything as follows:
sudo ./setup.sh -p 3.5
python3.5 app.py 'HostName=xxxx.azure-devices.net;DeviceId=device1;SharedAccessKey=GMMxxxxxxxxxxxxxxxxxxxxxxxxB5o='
so it should use python 3.5. but got same error as above
Traceback (most recent call last):
File "app.py", line 10, in <module>
from iothub_client import IoTHubClient, IoTHubClientError,
IoTHubTransportProvider, IoTHubClientResult
ImportError: No module named iothub_client
It's same error again.
Update: here is a snip from RPI
Ok so im trying my first Raspberry Pi project https://www.youtube.com/watch?v=Y2QFu-tTvTI
i have followed the steps for installing open cv and the other dependencies but when i try to run it i get the following error
(cv) pi#raspberrypi:~/Smart-Security-Camera $ python main.py
Traceback (most recent call last):
File "main.py", line 3, in <module>
from mail import sendEmail
File "/home/pi/Smart-Security-Camera/mail.py", line 2, in <module>
from email.MIMEMultipart import MIMEMultipart
ImportError: No module named 'email.MIMEMultipart'
i then tried entering "sudo python main.py" and got a different messege but the same problem as shown below
(cv) pi#raspberrypi:~/Smart-Security-Camera $ sudo python main.py
Traceback (most recent call last):
File "main.py", line 5, in <module>
from camera import VideoCamera
File "/home/pi/Smart-Security-Camera/camera.py", line 2, in <module>
from imutils.video.pivideostream import PiVideoStream
ImportError: No module named imutils.video.pivideostream
finally i tried "sudo python3 main.py" and again different messege same issue.
(cv) pi#raspberrypi:~/Smart-Security-Camera $ sudo python3 main.py
Traceback (most recent call last):
File "main.py", line 1, in <module>
import cv2
ImportError: No module named 'cv2'
any help is appreciated
LevPasha/instabot.py » Won't to work when i start script in Terminal
Traceback (most recent call last):
File "example.py", line 6, in <module>
from instabot import InstaBot
File "/Library/insta/src/instabot.py", line 4, in <module>
from userinfo import UserInfo
File "/Library/insta/src/userinfo.py", line 4, in <module>
import requests
ImportError: No module named requests
Thats what i see in my terminal. What to do?
I changed username and password in example.py
Go to the respective console of the OS.
Windows: (cmd)
pip install requests
Ubuntu and Debian (terminal)
sudo apt-get install python-requests
This will install requests module
I'm trying to run through the Guestbook tutorial on the google appengine website. I have Python 2.7.13 and Python 3.6 installed. However when I'm trying to run the program locally via dev_appserver.py ./ command I'm getting this error.
Traceback (most recent call last):
File "C:\Users\sameer\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\dev_appserver.py", line 11, in <module>
import bootstrapping.bootstrapping as bootstrapping
File "C:\Users\sameer\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\bootstrapping\bootstrapping.py", line 9, in <module>
import setup
ImportError: No module named 'setup'
I've tried installing and updating setuptools but it doesn't seem to work.
I download trunk version of OpenERP from lauchpad. When i start server it's gives following error
Traceback (most recent call last):
File "./openerp-server", line 2, in
import openerp
File "/home/jack/trunk/trunk-server/openerp/init.py", line 72, in
import http
File "/home/jack/trunk/trunk-server/openerp/http.py", line 37, in
from openerp.service import security, model as service_model
File "/home/jack/trunk/trunk-server/openerp/service/init.py", line 28, in
import server
File "/home/jack/trunk/trunk-server/openerp/service/server.py", line 10, in
import psutil
ImportError: No module named psutil
Getting this error because psutil is not installed. you have to install psutil using this command.
sudo apt-get install python-psutil in terminal. after this restart server. This will solve your error.