I recently picked up computer vision, with the help of Python's opencv and face_recognition library to write a simple image recognition demo, additional customization of some of the content, originally intended to be packaged into an exe and then sent to a friend, but in the middle of this encountered a number of small problems, have solved them, record the pits stepped on.
1, Pyinstaller packaging process appears warning, with the dll file related to the "C: \Windows\System32\downlevel" folder configured to the environment variable in the back, there is a warning, originally wanted to add the missing dll in the following, the back is really added to the way, by the way! Recommend a website to download dllFree download of missing DLL files | DLL- () Many missing dlls can be found and downloaded here.
2. There may be a conflict between conda and pip. After installing conda, my Python version became 3.12, but Pyinstaller is still the version I downloaded before, I looked on the Internet, there may be compatibility problems, then closed conda, and then half of the problem is solved.
3. possible path problem with face_recognition's mod.
The comment is the source code, I changed to the specific path of the model storage (face_recognition_models folder under the dat file), because I jumped to the resource_filename to take a look at the end of the time found that the function is None, so I changed it. Finally, I changed it and it was packaged successfully.
It's been a long time since I've updated, I've done a lot and learned a lot in the past six months, first I went to an internship at a startup in Hangzhou, then I submitted a pr for infinity, a well-known open source vector database, and then I went to a quantitative internship, and now I'm at home preparing for the fall recruiting process, so I'll share more when I have time.