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
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!
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
I can import mingus but sublibraries such as mingus.extra.lilypond give me an error:
import mingus.core.notes
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import mingus.core.notes
File "C:\Users\PharaohZz\AppData\Local\Programs\Python\Python36\lib\site-packages\mingus\core\notes.py", line 29, in <module>
from mt_exceptions import NoteFormatError, RangeError, FormatError
ModuleNotFoundError: No module named 'mt_exceptions'
or
import mingus.extra.lilypond
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import mingus.extra.lilypond
File "C:\Users\PharaohZz\AppData\Local\Programs\Python\Python36\lib\site-packages\mingus\extra\__init__.py", line 20, in <module>
import lilypond
ModuleNotFoundError: No module named 'lilypond'
You can fix this problem by first uninstalling mingus (pip uninstall mingus).
Then build the library from it's source. To do this:
Download the files from git hub using the command git clone https://github.com/bspaans/python-mingus .
Enter the directory using cd python-mingus.
Finally install it using the command python setup.py install.
This fixed the problem for me.
I can`t use the pyfcm module because of bellow error message.
How do I fix this error??
>>> from pyfcm import FCMNotification
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from pyfcm import FCMNotification
File "C:\Anaconda3\lib\site-packages\pyfcm\__init__.py", line 6, in <module>
from .fcm import FCMNotification
File "C:\Anaconda3\lib\site-packages\pyfcm\fcm.py", line 1, in <module>
from baseapi import BaseAPI
ImportError: No module named 'baseapi'
If you are running Linux, try running this command in the shell: pip install baseapi.
If you are using an IDE, look for a prompt asking if you want to install this package.
I am running Python 3.4
Did pip install json2html with no errors.
However, when I execute "import json2html" I got:
>>> import json2html
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python34\lib\site-packages\json2html-0.3-py3.4.egg\json2html\__init__.py", line 6, in <module>
ImportError: No module named 'jsonconv'
>>>
please help suggest..
It seems this library is not python3-compatible.
Error was caused by this line in the __init__.py file:
from jsonconv import *
While, instead, it should be:
from .jsonconv import *
Try this fork instead: https://github.com/YAmikep/json2html