I installed cmake, dlib and face_recognition but when I run my project I get this error
Code:
import face_recognition
import cv2
Error:
Traceback (most recent call last):
File "...\face recognition\main.py", line 1, in <module>
import face_recognition
ModuleNotFoundError: No module named 'face_recognition'
Check if you've istalled dlif and etc under some virtual enviromant but trying to run your code under general one (or vise versa)
Related
I was using pytesseract for OCR from images. Everything was working fine .. till I tried pip install pillow and pip easy install pillow in my cmd just for trying a random crop . After that when I try to import pytesseract. It keeps throwing error
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\pytesseract\pytesseract.py", line 28, in <module>
from PIL import Image
ModuleNotFoundError: No module named 'PIL'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pytesseract
File "C:\Python39\lib\site-packages\pytesseract\__init__.py", line 2, in <module>
from .pytesseract import ALTONotSupported
File "C:\Python39\lib\site-packages\pytesseract\pytesseract.py", line 30, in <module>
import Image
ModuleNotFoundError: No module named 'Image'
You are using Python 3.9 version. Pillow is compatible with that but only from v8. Check your pillow version. If its below 8, update it using:
>>pip install --upgrade Pillow
Moreover, if the 2nd error still persists, try this:
from PIL import Image
instead of
import Image
"ModuleNotFoundError: No module named 'numpy" error occurred when iam trying to generate .class file for my .py code using VOC .........please help...thnx in advance
(VoCProject) C:\Users\User\Desktop\virtualEnvs\VoCProject\actualProject>python RGBtoGray.py
Traceback (most recent call last):
File "sample.py", line 1, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'
Try installing NumPy with pip:
pip install numpy
Then you should be able to import without errors.
I try to use ImageGrab (open-cv function)
OS: lubuntu
First, I did: sudo apt-get install python-opencv.
Installation went successfuly.
Then I tried to do: from PIL import ImageGrab. But at this point I got the following ImportError:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/user/lib/python2.7/dist-packages/PIL/ImageGrab.py", line 26, in <module> import _grabscreen
ImportError: No module named _grabscreen
Where am I wrong?
Unfortunately - ImageGrab only works with Windows
Alternative: pyscreenshot
I ran both
sudo pip install asprise_ocr_sdk_python_api
pip install asprise_ocr_sdk_python_api
Got message
"Requirement already satisfied: asprise_ocr_sdk_python_api in /Users/myid/miniconda3/envs/competition/lib/python3.5/site-packages"
But when I ran asprise_ocr to test:
Got the following error:
Traceback (most recent call last):
File "/Users/myuser/miniconda3/envs/competition/bin/asprise_ocr", line 7, in <module>
from asprise_ocr_api.ocr_app import run_ocr_app
File "/Users/myuser/miniconda3/envs/competition/lib/python3.5/site-packages/asprise_ocr_api/__init__.py", line 1, in <module>
from ocr import *
ImportError: No module named 'ocr'
The asprise_ocr_api module doesn't do submodule imports correctly in Python 3.
For example init.py contains from ocr import *. For a sub-module in Python 3 that should be from .ocr import *. Idem for from ocr_app import OcrApp, run_ocr_app. That should be from .ocr_app import OcrApp, run_ocr_app.
After making these changes in all files it imports correctly.
i've tried:
import ocr
same error:
ModuleNotFoundError: No module named 'ocr'
i am using python 3
I'm using Anaconda3 version 4.2.0 on ubuntu (in docker).
Anaconda is installed in /root/anaconda3 folder.
I installed theano_bpr package using pip install theano_bpr.
Now when i open python and try import theano_bpr, i get the following message:
>>> import theano_bpr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/anaconda3/lib/python3.5/site-packages/theano_bpr/__init__.py", line 17, in <module>
from bpr import BPR
ImportError: No module named 'bpr'
However, when i navigate to /root/anaconda3/lib/python3.5/site-packages/theano_bpr/ and run python there, i'm able to import theano_bpr.
In /root/anaconda3/lib/python3.5/site-packages/theano_bpr/ there are following files:
__init__.py, bpr.py (this one is causing problems), t.py, and utils.py.