I've been having a consistent problem upgrading python3 with homebrew.
When I run "brew upgrade python3", I get
==> Upgrading 1 outdated package, with result: python3 3.6.5 ==> Processing python3 formula rename to python ==> Unlinking python3 ==> Temporarily unlinking python Error: Error occurred while migrating. No such file or directory @ realpath_rec - /usr/local/opt/python Backing up... Error: No such file or directory @ realpath_rec - /usr/local/opt/python ==> Upgrading python3 Error: No such file or directory @ realpath_rec - /usr/local/opt/python Despite failing the upgrade, it has the side-effect of destroying my python3 symlink, so I have to run "brew link python3" afterwards to use it again. This error also screws up brew installs of other packages that depend on python, so it's getting to be pretty bad. Can someone help me fix it?
Edit: I tried "brew uninstall python" and "brew install python" but I get:
~$ brew uninstall python Warning: Use veclibfort instead of deprecated homebrew/science/veclibfort Uninstalling /usr/local/Cellar/python/2.7.14... (3,614 files, 50.6MB) Error: No such file or directory @ realpath_rec - /usr/local/opt/python ~$ brew install python ==> Processing python3 formula rename to python ==> Unlinking python3 ==> Temporarily unlinking python Error: Error occurred while migrating. No such file or directory @ realpath_rec - /usr/local/opt/python Backing up... Error: No such file or directory @ realpath_rec - /usr/local/opt/python Error: python 2.7.14 is already installed To upgrade to 3.6.5, run `brew upgrade python`
brew install pythoninstalls python3.6 aspython3andbrew install python@2will install python2.7 aspython. You shouldn't have any custom symlinks. Trybrew uninstall pythonthenbrew install python.pyenvinstead of messing with Homebrew Pythonpip install pyqt5with python.org Python against Homebrew Qt5, many of which didn't work a couple years ago.)brew uninstall python3as well?