Sample Header Ad - 728x90

Python installation broken after Homebrew auto updated

1 vote
1 answer
505 views
My python installation was messed up after I ran the command brew install curl causing Homebrew to auto update. Since then, I discovered that matplotlib was not installed (it was before the update), which I had to install with brew and not pip, and whenever I import the newly installed matlplotlib.pyplot, there is an error regarding not finding PIL. Installing Pillow does not have any effect on this error. Is there a way to reverse that to when everything worked well on my Mac? I am running macOS Sonoma 14.5. Any help is welcome. Thanks!
============= ERROR on importing matplotlib =============================

himilcon [Documents]  % python3   
Python 3.12.4 (main, Jun  6 2024, 18:26:44) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "", line 1, in 
  File "/opt/homebrew/Cellar/python-matplotlib/3.9.1/libexec/lib/python3.12/site-packages/matplotlib/__init__.py", line 159, in 
    from . import _api, _version, cbook, _docstring, rcsetup
  File "/opt/homebrew/Cellar/python-matplotlib/3.9.1/libexec/lib/python3.12/site-packages/matplotlib/rcsetup.py", line 28, in 
    from matplotlib.colors import Colormap, is_color_like
  File "/opt/homebrew/Cellar/python-matplotlib/3.9.1/libexec/lib/python3.12/site-packages/matplotlib/colors.py", line 52, in 
    from PIL import Image
ModuleNotFoundError: No module named 'PIL'
>>> quit()
> 
> 


=========== auto update initial lines ===================================

himilcon [depends]  % brew install curl                                                 
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
libgit2@1.7                                                               tdb
==> New Casks
avbeam                                           duplicateaudiofinder                             twingate
Error: Unexpected method 'appcast' called on Cask adoptopenjdk8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs 

You have 125 outdated formulae and 1 outdated cask installed.
Error: Unexpected method 'appcast' called on Cask adoptopenjdk8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs 
Error: Unexpected method 'appcast' called on Cask adoptopenjdk8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs 
==> Migrating formula atk to at-spi2-core
==> Unlinking atk
==> Moving atk versions to /opt/homebrew/Cellar/at-spi2-core
==> Relinking at-spi2-core
Warning: at-spi2-core is outdated!
To avoid broken installations, as soon as possible please run:
  brew upgrade
Or, if you're OK with a less reliable fix:
  brew upgrade at-spi2-core

==> Downloading https://ghcr.io/v2/homebrew/core/curl/manifests/8.8.0 
########################################################################################################################################### 100.0%
==> Fetching dependencies for curl: brotli, libunistring, gettext, libidn2, libnghttp2, ca-certificates, openssl@3, libssh2, openldap, rtmpdump, xz and zstd
Asked by Himilcon Carvalho (11 rep)
Jul 18, 2024, 03:00 PM
Last activity: Apr 15, 2025, 01:04 AM