I want to install matplotlib for Python using MSYS MinGW x64. The command
$ pacman -S mingw-w64-x86_64-python-matplotlib
had failed previously. Then I made some changes, and now I want to try the above command again, but I only get these error messages:
$ pacman -S mingw-w64-x86_64-python-matplotlib
resolving dependencies...
looking for conflicting packages...
Packages (12) mingw-w64-x86_64-libimagequant-4.0.4-2 mingw-w64-x86_64-libraqm-0.9.0-1
mingw-w64-x86_64-python-cycler-0.11.0-2 mingw-w64-x86_64-python-dateutil-2.8.2-3
mingw-w64-x86_64-python-fonttools-4.38.0-1 mingw-w64-x86_64-python-packaging-22.0-1
mingw-w64-x86_64-python-pillow-9.3.0-2 mingw-w64-x86_64-python-pyparsing-3.0.9-3
mingw-w64-x86_64-python-pytz-2022.7-1 mingw-w64-x86_64-python-six-1.16.0-3
mingw-w64-x86_64-qhull-2020.2-2 mingw-w64-x86_64-python-matplotlib-3.6.2-1
Total Installed Size: 60.64 MiB
:: Proceed with installation? [Y/n] Y
imelf@DESKTOP-CFHKUQA MINGW64 ~
$ pacman -S mingw-w64-x86_64-python-matplotlib
resolving dependencies...
looking for conflicting packages...
Packages (12) mingw-w64-x86_64-libimagequant-4.0.4-2 mingw-w64-x86_64-libraqm-0.9.0-1
mingw-w64-x86_64-python-cycler-0.11.0-2 mingw-w64-x86_64-python-dateutil-2.8.2-3
mingw-w64-x86_64-python-fonttools-4.38.0-1 mingw-w64-x86_64-python-packaging-22.0-1
mingw-w64-x86_64-python-pillow-9.3.0-2 mingw-w64-x86_64-python-pyparsing-3.0.9-3
mingw-w64-x86_64-python-pytz-2022.7-1 mingw-w64-x86_64-python-six-1.16.0-3
mingw-w64-x86_64-qhull-2020.2-2 mingw-w64-x86_64-python-matplotlib-3.6.2-1
Total Installed Size: 60.64 MiB
:: Proceed with installation? [Y/n] Y
(12/12) checking keys in keyring [###############################] 100%
(12/12) checking package integrity [###############################] 100%
(12/12) loading package files [###############################] 100%
(12/12) checking for file conflicts [###############################] 100%
error: failed to commit transaction (conflicting files)
mingw-w64-x86_64-python-six: /mingw64/lib/python3.10/site-packages/__pycache__/six.cpython-310.pyc exists in filesystem
mingw-w64-x86_64-python-six: /mingw64/lib/python3.10/site-packages/six.py exists in filesystem
mingw-w64-x86_64-python-cycler: /mingw64/lib/python3.10/site-packages/__pycache__/cycler.cpython-310.pyc exists in filesystem
mingw-w64-x86_64-python-cycler: /mingw64/lib/python3.10/site-packages/cycler.py exists in filesystem
mingw-w64-x86_64-python-dateutil: /mingw64/lib/python3.10/site-packages/dateutil/__init__.py exists in filesystem
mingw-w64-x86_64-python-dateutil: /mingw64/lib/python3.10/site-packages/dateutil/__pycache__/__init__.cpython-310.pyc exists in filesystem
mingw-w64-x86_64-python-dateutil: /mingw64/lib/python3.10/site-packages/dateutil/__pycache__/_common.cpython-310.pyc exists in filesystem
mingw-w64-x86_64-python-dateutil: /mingw64/lib/python3.10/site-packages/dateutil/__pycache__/_version.cpython-310.pyc exists in filesystem
mingw-w64-x86_64-python-dateutil: /mingw64/lib/python3.10/site-packages/dateutil/__pycache__/easter.cpython-310.pyc exists in filesystem
My question: How can I delete the cached files, so I get meaningful error messages again. Or is there another way to install matplotlib with MSYS MinGW x64
I managed to solve the problem by writing a small Java programm that would delete all those files that were cached. After that deletion, matplotlib could be successfully installed by pacman and is working now fine. Here is my code:
where I saved the output of MSYS2 from the question to the files filesToDelete.txt.