Astrotomic / php-deepface

A PHP adapter for the python deepface framework.
https://github.com/serengil/deepface
MIT License
36 stars 7 forks source link

Issues on windows #18

Open xpressonlineventures opened 2 months ago

xpressonlineventures commented 2 months ago

I am having a bit of a problem getting the script to run on Windows. This is the error I am getting: "'python3' is not recognized as an internal or external command, operable program, or batch file.". I have set my environment variables; I also copy and paste the python.exe, then rename it python3.exe, just to see if it would work, and I keep getting the same error. 

These are my environment variables: (A) C:\Program Files\Python312\Scripts\ (B) C:\Program Files\Python312\

I would appreciate any suggestions.

pablo-gbr commented 1 month ago

Hi, sorry for the late reply

Did you set the python path when creating the object? Like this:

$deepface = new \Astrotomic\DeepFace\DeepFace(
    python: 'C:/Your/path/here',
);

Also, do you have the proper PYTHONPATH set on Windows? Consider using my branch until the PR is merged, it has support for the latest version of deepface and it has some issues fixed that were added by mistake