When building with the latest numpy version (v1.24.0), OpenSeeFace crashes with "AttributeError: module 'numpy' has no attribute 'float'". This is because the attribute 'float' is now deprecated in numpy v1.24. I have changed the requirements to the earlier version v1.23.0. This should probably only be a temporary fix, as I'm sure there is a good reason that float was depreciated. I would also recommend changing the requirements to a single file with a static version for each requirement that is known to work. This will help ensure the stability of the program. I may do this in another fork when I have more time if you want.
31 lines
807 B
Batchfile
31 lines
807 B
Batchfile
echo "Started"
|
|
|
|
:: A venv is used so it's easy to add the onnxruntime dll to the binary
|
|
|
|
echo "Creating venv"
|
|
python -m venv venv
|
|
|
|
echo "Activating venv"
|
|
call venv\Scripts\activate.bat
|
|
|
|
echo "Installing dependencies"
|
|
pip install wheel
|
|
|
|
pip install onnxruntime opencv-python==4.5.4.60 pillow numpy==1.23.0 pyinstaller
|
|
|
|
echo "Running pyinstaller"
|
|
pyinstaller facetracker.py --clean ^
|
|
--onedir ^
|
|
--add-binary dshowcapture/*.dll;. ^
|
|
--add-binary escapi/*.dll;. ^
|
|
--add-binary venv/lib/site-packages/onnxruntime/capi/*.dll;onnxruntime\capi ^
|
|
--add-binary msvcp140.dll;. ^
|
|
--add-binary vcomp140.dll;. ^
|
|
--add-binary concrt140.dll;. ^
|
|
--add-binary vccorlib140.dll;. ^
|
|
--add-binary run.bat;.
|
|
|
|
echo "Deleting opencv dll"
|
|
del dist\facetracker\cv2\opencv_videoio_*
|
|
|
|
echo "Finished"
|