On Windows, swig interprets quotes in environment variables as literals instead of path with special characters. Example: swig gave me error not finding swig.swg despite I had environment variable set with set SWIG_LIB="C:\Progra~2\swigwin-4.0.2\Lib" (with quotes) and swig.swg was there. So I've removed quotes with command set SWIG_LIB=C:\Progra~2\swigwin-4.0.2\Lib and swig found swig.swg.
This is normal Windows behaviour to include the quotes in the environment variable, so don't include them of they are not part of the directory name!