Skip to content

Homebrew fails to install mopidy, "No module named 'setuptools'" (Sonoma 14.4.1, M3) #45

@limsammy

Description

@limsammy

Hello!
This may potentially be related to #37 , or it's my Python installation.

I'm setting up all my old dotfiles and configurations on my new M3 Pro Macbook running Sonoma 14.4.1.

Python install information

  • Using pyenv to manage installations
  • Currently have global set to Python version 3.12.3 (outputs with python --version)
  • Using pipx for packages like poetry, mypy, black, etc. that I want available globally; the ones I don't want to reinstall for each virtualenvironment
  • Here's brew info python3 for more info (same version):
==> python@3.12: stable 3.12.3 (bottled)
Interpreted, interactive, object-oriented programming language
https://www.python.org/
Installed
/opt/homebrew/Cellar/python@3.12/3.12.3 (3,295 files, 66.1MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-04-12 at 12:18:17
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/p/python@3.12.rb
License: Python-2.0
==> Dependencies
Build: pkg-config ✔
Required: mpdecimal ✔, openssl@3 ✔, sqlite ✔, xz ✔
==> Caveats
Python has been installed as
  /opt/homebrew/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /opt/homebrew/opt/python@3.12/libexec/bin

See: https://docs.brew.sh/Homebrew-and-Python
==> Analytics
install: 293,398 (30 days), 737,776 (90 days), 1,227,054 (365 days)
install-on-request: 88,329 (30 days), 209,616 (90 days), 255,781 (365 days)
build-error: 1,822 (30 days)

How I reached this error:

  1. As per documentation, I started by tapping the keg: brew tap mopidy/mopidy
  2. I then proceed to run the install command via brew: brew install mopidy

The following is the command output & error, the error being setuptools not being installed.

==> Fetching mopidy/mopidy/mopidy
==> Downloading https://files.pythonhosted.org/packages/71/da/e94e26401b62acd6d91df2b52954aceb7f561743aa5ccc32152886c76c96/certifi-2024.2.2.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/downloads/cab95f94f18dbe8114d07b1a1c36d3210920c1ce371e9dda653ac1b31b44554d--certifi-2024.2.2.tar.gz
==> Downloading https://files.pythonhosted.org/packages/63/09/c1bc53dab74b1816a00d8d030de5bf98f724c52c1635e07681d312f20be8/charset-normalizer-3.3.2.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/downloads/333faf254dbcd63beac143859da082cb971bf2c230a9c7c4345e9f932aafdc3a--charset-normalizer-3.3.2.tar.gz
==> Downloading https://files.pythonhosted.org/packages/62/08/e3fc7c8161090f742f504f40b1bccbfc544d4a4e09eb774bf40aafce5436/idna-3.3.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/downloads/b61bd327cd7a0ba298cc7cdb6f314f028e8547bef2f814156ce50702a6faf562--idna-3.3.tar.gz
==> Downloading https://files.pythonhosted.org/packages/45/e9/ba139b5becd0e4bdf10a816af3fc17f788ac630159ca959d6da44d91a7be/pykka-3.1.1.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/downloads/899810714776bccf61ef5a957dabe1d96819309b0c02e19cb6f2a89c06b70120--pykka-3.1.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/9d/be/10918a2eac4ae9f02f6cfe6414b7a155ccd8f7f9d4380d62fd5b955065c3/requests-2.31.0.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/downloads/72bc99cc85fb475c8a06e79cabbbf73455bdd66813fbf3abb08aa84808577bcc--requests-2.31.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/bd/a2/ea124343e3b8dd7712561fe56c4f92eda26865f5e1040b289203729186f2/tornado-6.4.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/downloads/586d290afec6d28d277e6a5e427e7995de0c610a1bd0acb9438295d939b8f608--tornado-6.4.tar.gz
==> Downloading https://files.pythonhosted.org/packages/0c/39/64487bf07df2ed854cc06078c27c0d0abc59bd27b32232876e403c333a08/urllib3-1.26.18.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/downloads/e99e989d11c87d13b2d9010dcd4f1a44d73e384c014d444045490685a74b522a--urllib3-1.26.18.tar.gz
==> Downloading https://files.pythonhosted.org/packages/cc/41/1f291572997c49fce9eef47cea6d06b7d30e9923cc75a84679767f7fc99e/Mopidy-3.4.2.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/downloads/f0322831287fe008b32f224e0c2b93a531dfa2acdc3a29d9beb44d30d9d024e7--Mopidy-3.4.2.tar.gz
==> Installing mopidy from mopidy/mopidy
�[34m==>�[0m �[1m/opt/homebrew/opt/python@3.12/bin/python3.12 -c import setuptools... --no-us�[0m
Last 15 lines from /Users/sam/Library/Logs/Homebrew/mopidy/01.python3.12:
import setuptools, tokenize
__file__ = 'setup.py'
exec(compile(getattr(tokenize, 'open', open)(__file__).read()
  .replace('\r\n', '\n'), __file__, 'exec'))
--no-user-cfg
install
--prefix=/opt/homebrew/Cellar/mopidy/3.4.2/libexec
--install-scripts=/opt/homebrew/Cellar/mopidy/3.4.2/libexec/bin
--install-lib=/opt/homebrew/Cellar/mopidy/3.4.2/libexec/lib/python3.12/site-packages
--single-version-externally-managed
--record=installed.txt

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/mopidy/homebrew-mopidy/issues

These open issues may also help:
brew's mopidy package fails to install on Fedora39 https://github.com/mopidy/homebrew-mopidy/issues/44
GST plugins 1.20.x break mopidy audio playback on intel machines https://github.com/mopidy/homebrew-mopidy/issues/41

It seems like setuptools cannot be located with brew. Does anyone have any advice?

I ran easy_install --version to verify if setuptools is installed and easy_install is not installed either (zsh unrecognized command)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions