I wrote a simple script using face_recognition python library. But when I tried to execute the script I am getting below error.
Traceback (most recent call last):
File "face.py", line 1, in <module>
import face_recognition
File "/home/user/.local/lib/python3.7/site-packages/face_recognition/__init__.py", line 7, in <module>
from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
File "/home/user/.local/lib/python3.7/site-packages/face_recognition/api.py", line 4, in <module>
import dlib
ImportError: Python version mismatch: module was compiled for version 3.8, while the interpreter is running version 3.7.
How to resolve it?
Install Python 3.8, this would solve the problem
Related
when I try to convert my python file into .exe using auto-py-to-exe an error occure:
Traceback (most recent call last):
File "Jumper.py", line 5,
in File "C:\Users\Clowny\output\Jumper\customtkinter_init_.py", line 10, in
from .appearance_mode_tracker import AppearanceModeTrackerù
File "C:\Users\Clowny\output\Jumper\customtkinter\appearance_mode_tracker.py", line 3, in
from distutils.version import StrictVersion as Version
ModuleNotFoundError: No module named 'distutils'
I already used the documentation steps but it still doesn't working.
can anyone help me?
I have been trying to code the display on my Ableton push 2 with python using this guide: github.com/ffont/push2-python#using-the-simulator, but I ran into a problem with pyusb and i was missing libusb. pip3 kept saying I already had it installed but I still kept getting errors when trying to use Libusb. So i tried using homebrew and it installed it but I still keep getting errors when using libusb.
this is what my terminal looks like when trying to import:
>>> import libusb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/libusb/__init__.py", line 7, in <module>
from ._libusb import * ; del _libusb # noqa
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/libusb/_libusb.py", line 29, in <module>
from ._platform import CFUNC
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/libusb/_platform/__init__.py", line 33, in <module>
from ._osx import DLL_PATH, DLL, dlclose, CFUNC
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/libusb/_platform/_osx/__init__.py", line 14, in <module>
raise NotImplementedError("This OS is not supported yet!")
NotImplementedError: This OS is not supported yet!
I am getting an error while importing the face_recognition library. I have tried using a Virtual Environment too. Please help.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Python38\lib\site-packages\face_recognition-1.3.0-py3.8.egg\face_recognition\__init__.py", line 7, in <module>
from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
File "C:\Program Files\Python38\lib\site-packages\face_recognition-1.3.0-py3.8.egg\face_recognition\api.py", line 17, in <module>
face_detector = dlib.get_frontal_face_detector()
AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector'
Version: Python 3.8
OS: Windows 10
You need to download the face database shape_predictor_68_face_landmarks, you need to download it and unzip it and put it in the folder where your code is located
Face Library Download Link:http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
I just have installed wxPython and python toolkit 18.08 in Ubuntu 20.04.But,while runnimg from command line python PTK.pyw, I got an error as below
> Traceback (most recent call last):
File "PTK.pyw", line 10, in <module>
import ptk_lib.app as app
File "/home/jobayer/下载/PythonToolkit-18.08/ptk_lib/app.py", line 17, in <module>
from ptk_lib.message_bus.mb_node import MBLocalNode
File "/home/jobayer/下载/PythonToolkit-18.08/ptk_lib/message_bus/mb_node.py", line 14, in <module>
import mb_protocol
ModuleNotFoundError: No module named 'mb_protocol'
I did not find mb_protocol module any where.Where can I find this module?
I am trying to compile a python script for visualization of protein molecules using py2exe module. I've python2.7 running in win7 x64. When I try to execute the compiled file, it gives this error:-
C:\Python27\dist>visualn.exe
Traceback (most recent call last):
File "visualn.py", line 19, in <module>
File "MMTK\__init__.pyc", line 39, in <module>
File "Scientific\Geometry\__init__.pyc", line 30, in <module>
File "Scientific\Geometry\VectorModule.pyc", line 9, in <module>
File "Scientific\N.pyc", line 1, in <module>
ImportError: No module named Scientific_numerics_package_id
Without compiling I can run the script successfully. I've already installed scientific,MMTK modules. I got somewhere in the internet that Scientific_numerics_package_id module is available in netCDF4, so I installed that also but no good.
Any idea about the error?
You need the python-netcdf package.