Conda mingw-w64 path conflicts

On Windows, Anaconda Python can install GCC libraries such as libstdc++ and libgfortran et al under miniconda3/Library/mingw-w64/bin. This path is put by default by fresh Anaconda installation on Path by “conda activate”, but no files are installed there until certain packages are installed. These libraries are for a particular GCC version, and are not necessarily ABI compatible with the GCC version on the system perhaps from MSYS2.

This problem can manifest as Windows error code 139 when running other executables that need say libstdc++ but Anaconda’s path is overriding the desired GCC lower on Path.

The solution to this problem could be either:

  • uninstall the conda Python package that installed those libraries
  • rename the Library/mingw-w64/bin e.g. to bin-backup and see if the needed Python packages still work