This project provides an automated Windows build pipeline for FFCV and Fastxtend, eliminating the need for preinstalled Python. It focuses on integrating Micromamba and MSVC, addressing challenges in dependency resolution and DLL behavior on Windows. The scripts bootstrap a self-contained Conda environment, fetching necessary native libraries like OpenCV and pthreads. They also precisely configure the MSVC toolchain for building these Python packages.
The primary motivation stems from the historically undocumented and broken Windows installation process for FFCV and Fastxtend. This project aims to create a transparent, reproducible, and inspectable build environment, offering insights into the complexities of native Python compilation on Windows. Prerequisites include Windows 10+, MS Build Tools with the C++ workload, and curl/tar in the PATH.
Key to the process is correctly setting environment variables such as INCLUDE, LIB, PATH, and LINK before the pip installation. A common pitfall, the "Microsoft Visual C++ 14.0 or greater is required" error, is bypassed by setting DISTUTILS_USE_SDK=1. The project predefines correct dependency values via MSVC environment variables, circumventing FFCV's specific setup issues.
It integrates external libraries like OpenCV and pthreads, along with Conda-provided LibJPEG-Turbo. Debugging "DLL load failed" errors involves identifying missing dependencies, as Python 3.8+ has stricter DLL search order policies. The solution involves copying essential DLLs into trusted directories like Anaconda\Library\bin. This project serves as a valuable learning resource for understanding Windows native compilation.
dev.to
dev.to
