-
Notifications
You must be signed in to change notification settings - Fork 13.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module 'face_recognition' has no attribute 'load_image_file' #318
Comments
Do you have another file in that folder called |
This same error plagues my face rec script on my pi. |
No |
Same problem for me, did you solve it ? |
@marksrg no we have not resolved this issue yet |
If you don't have a file called If you are having this issue, please save this script to a file and run it with the same version of python you are having the issue with. Then paste the full output from the script in a comment here and we'll see if we can figure it out. import sys
import inspect
import face_recognition
try:
print("face_recognition version:")
print(face_recognition.__version__)
except Exception as e:
print(e)
try:
print()
print("face_recognition path:")
print(face_recognition.__file__)
except Exception as e:
print(e)
try:
print()
print("face_recognition path (alternate method):")
print(inspect.getfile(face_recognition))
except Exception as e:
print(e)
print()
print("Python version:")
print(sys.version)
print("Python executable:")
print(sys.executable)
try:
print("Python base path:")
print(sys.base_prefix)
except Exception as e:
print(e)
print("Python base path (exec):")
print(sys.exec_prefix)
print("Python system path:")
print(sys.path) |
Hey ! Thanks for your help, I really appreciate that since I don't really understand how Python works with the OS. Here is the result of your function :
|
The As a test, I would try moving the It's a strange problem and it's hard to debug without being able to reproduce the problem myself so far, so this is kind of a guess. Let me know what result you get. |
Yes I set the PYTHONPATH myself otherwise Python 3 from the cv virtual environnement wouldn't find face_recognition. I understand, no problem ! It's already very nice from you to help me since I'm a beginner. |
We get the following output from the script
|
@mvput Hmm. It's loading the module from You might try deleting the |
@marksrg Now that you got rid of that extra copy, you might try just installing face_recognition from pip again - |
Thank you for your help ! Actually I copied the face_recognition folder to one of the folders in the PYTHONPATH and it works well. |
Great! |
We deleted the And that worked! The screen camera screen window came up only the image starts flickering and 25% cpuload we will investigate that further Thank you for your help in advance |
Meet same iusse, resolved. THX |
Hello! I got the following output from the script, and I don't understand... face_recognition version: face_recognition path: face_recognition path (alternate method): Python version: |
Oh! I know how to solve such mistakes. Thank you anyway! |
Don't name your own script |
Hello i'm the same error, somebody help me `C:\Users\Fabiano Oliveira\Desktop\Nova pasta>python teste.py face_recognition path: face_recognition path (alternate method): Python version: |
face_recognition version: face_recognition path: face_recognition path (alternate method): Python version: I am getting this, can anyone help ? |
@Monica1998 it looks like somehow you got the face_recognition_models package installed where face_recognition should be. How did you install things? |
I installed it through conda, how can i repair this. I am using anaconda |
through this website : https://anaconda.org/akode/face_recognition_models |
@Monica1998 Did you found any solution to the problem. I'm also using conda and imported the same package. |
Thanks. I have a function which is named "face_recognition". After I modify it, it works. |
Importing the module as face_recognition will not work |
@mvput face_recognition path: face_recognition path (alternate method): Python version: import face_recognition_models as face_recognition import face_recognition_models as face_recognition
|
I rename my file from Face_Recognition.py to something else and it works. |
yaaa same happened with me when i got Attribute Error: for Load_image_file. It worked when i changed the file name. Im a beginner too 👍 |
i have the same problem here when i run the test code the output like this face_recognition version: face_recognition path: face_recognition path (alternate method): Python version: |
same. I only want to use face_detection but after, installed from git both the face_recognition and the models doesnt work. I want to run this in my pycharm: import face_recognition.face_recognition.api as face_recognition |
Install Virtual Enviorment I did the same and resolved my issue |
My output face_recognition path: face_recognition path (alternate method): Python version: |
face_recognition version: face_recognition path: face_recognition path (alternate method): Python version: got this output i am facing some kind of weird error don't know what's wrong. the image is the error from this code:
|
Description
Installed dlib using: https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf and
pip3 install face_recognition
. Cloned the samples repo.What I Did
The text was updated successfully, but these errors were encountered: