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
Related
Thanks in advance!
I've installed torch2trt as follows:
git clone https://github.com/NVIDIA-AI-IOT/trt_pose
cd trt_pose
sudo python3 setup.py install
Through a terminal opening python3,i can do the following - HOORAY!
import torch2trt
print(torch2trt.__file__)
/home/user/torch2trt/torch2trt/__init__.py
However when I run my script which imports torch2trt i get the following message:
import torch2trt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.1.0-py3.6.egg/torch2trt/__init__.py", line 14, in <module>
File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.1.0-py3.6.egg/torch2trt/__init__.py", line 7, in load_plugins
ModuleNotFoundError: No module named 'torch2trt.plugins'
Please help my NOOBNESS!
Running the following test script
import win32api
print(win32api.EnumDisplaySettings().DisplayFrequency) # just for testing
works absoultely fine out of my IDE PyCharm, but running this script via Terminal using "python test.py" produces the following error:
Traceback (most recent call last):
File "test.py", line 1, in <module>
import win32api
ModuleNotFoundError: No module named 'win32api'
How can I fix this?
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
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
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.