homebrew python upgrade breaks installed python tools

Viewed 1147

I use Homebrew and pip to manage my Python installation. A recent brew upgrade seems to have broken the Python shell commands such as pip, ipython and jupyter.

 !  ~/ jupyter                                                                                                                                                                                                                                                                                                                                                                                          Sat Oct 27 14:06:46 2018
Failed to execute process '/usr/local/bin/jupyter'. Reason:
The file '/usr/local/bin/jupyter' specified the interpreter '/usr/local/opt/python3/bin/python3.6', which is not an executable command.

Furthermore, the brew upgrade was supposed to upgrade to Python 3.7, which is now on the system, but the command python3 still points to 3.6.

My instinct is to start over with a clean install of everything Python. Can you suggest a way to do this (especially now that pip is broken)?

brew reinstall jupyter does not fix this, and produces:

==> Installing jupyter
==> Downloading https://homebrew.bintray.com/bottles/jupyter-1.0.0_5.high_sierra.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/35/357e40d51326385dda5eed4cef3fbb3640d3955ba8010145ca45459529231114?__gda__=exp=1540644375~hmac=049a5af67ac32cab5a66ad1346299fae0f82d746bd3e9b447d9a21a268e96ad0&response-content-disposition=attachment%3Bfilename%3D%22jupyter-1.0.0_5.high_sierra.bottle.1.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX1_OrYeCyc0sGgKRw0sOPJEjC3dAXrj6v6YoPm3azxR3Et6paTgqR
######################################################################## 100.0%
==> Pouring jupyter-1.0.0_5.high_sierra.bottle.1.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/jupyter
Target /usr/local/bin/jupyter
already exists. You may want to remove it:
  rm '/usr/local/bin/jupyter'

To force the link and overwrite all conflicting files:
  brew link --overwrite jupyter

To list all files that would be deleted:
  brew link --overwrite --dry-run jupyter

Possible conflicting files are:
/usr/local/bin/jupyter
/usr/local/bin/jupyter-console
/usr/local/bin/jupyter-kernel
/usr/local/bin/jupyter-kernelspec
/usr/local/bin/jupyter-migrate
/usr/local/bin/jupyter-nbconvert
/usr/local/bin/jupyter-run
/usr/local/bin/jupyter-troubleshoot
/usr/local/bin/jupyter-trust
0 Answers
Related