Homebrew-core: python: postinstall fails

Created on 2 Mar 2018  ·  6Comments  ·  Source: Homebrew/homebrew-core

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • [x] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • [x] have a problem with brew install (or upgrade, reinstall) a single, official formula (not cask)? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new. If it's a brew cask problem please file this issue at https://github.com/caskroom/homebrew-cask/issues/new. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • [x] ran brew update and can still reproduce the problem?
  • [ ] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • [x] if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

  • What you were trying to do (and why)

Upgrade python to Python 3.

  • What happened (include command output)
❯❯❯ brew upgrade python
==> Upgrading 1 outdated package, with result:
python 3.6.4_3
==> Upgrading python 
==> Downloading https://homebrew.bintray.com/bottles/python-3.6.4_3.high_sierra.
######################################################################## 100.0%
==> Pouring python-3.6.4_3.high_sierra.bottle.tar.gz
==> /usr/local/Cellar/python/3.6.4_3/bin/python3 -s setup.py --no-user-cfg insta
==> /usr/local/Cellar/python/3.6.4_3/bin/python3 -s setup.py --no-user-cfg insta
Last 15 lines from /Users/sjackman/Library/Logs/Homebrew/python/post_install.02.python3:
-s
setup.py
--no-user-cfg
install
--force
--verbose
--install-scripts=/usr/local/Cellar/python/3.6.4_3/bin
--install-lib=/usr/local/lib/pythonCurrent/site-packages
--single-version-externally-managed
--record=installed.txt

Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    from setuptools import setup, find_packages
ModuleNotFoundError: No module named 'setuptools'
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall python`
==> Caveats
Pip, setuptools, and wheel have been installed. To update them
  pip3 install --upgrade pip setuptools wheel

You can install Python packages with
  pip3 install <package>

They will install into the site-package directory
  /usr/local/lib/pythonCurrent/site-packages

See: https://docs.brew.sh/Homebrew-and-Python

Unversioned symlinks python, python-config, pip etc. pointing to python3,
python3-config, pip3 etc., respectively, have been installed.
==> Summary
🍺  /usr/local/Cellar/python/3.6.4_3: 3,330 files, 52.4MB
brew upgrade python  5.14s user 3.03s system 79% cpu 10.272 total 64424 MB

Running brew postinstall python gives the same error.

  • What you expected to happen

It upgrades python.

  • Step-by-step reproduction instructions (by running brew install commands)
brew update && brew upgrade python

All 6 comments

brew update && brew postinstall python

Works now after brew update && brew postinstall python. Thanks!

Thank @DomT4!

Thank you, Dominyk! 🏅

Still useful around here sometimes 😸.

Was this page helpful?
0 / 5 - 0 ratings