I’ve followed the above instructions but the
brew install snapcraft is failing at the last step with the error:
==> Installing dependencies for snapcraft: python, lz4, lzo and squashfs
Error: python is already installed from !
Please `brew uninstall python` first."
I had Python 3 installed in /usr/local/bin/python and it is version 3.7 - why should I need to uninstall it? Actually somehow my python3 is no longer available, so its even worse, something has broken. And even if I try to uninstall python as suggested, I get the error:
$ brew uninstall python
Error: Refusing to uninstall /usr/local/Cellar/python/3.7.0
because it is required by httpie, libxml2, libxslt and pipenv, which are currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies python
Any advice on installing snapcraft on Mac OS Mojave would be appreciated.
Update: I repaired my Python (which was set on 3.7.0) to Python 3.7.3 and tried again using
brew upgrade python3
brew install snapcraft
and snapcraft finally installed. Perhaps snapcraft didn’t like that I had an older Python 3 installed or something. I have had these brew versions installed:
/usr/local/Cellar/python/3.6.4_4 (9,009 files, 152.6MB)
Built from source on 2018-03-13 at 22:29:29
/usr/local/Cellar/python/3.7.0 (4,961 files, 105.2MB)
Poured from bottle on 2019-01-09 at 11:28:53
/usr/local/Cellar/python/3.7.1 (3,887 files, 60.1MB)
Poured from bottle on 2018-12-05 at 20:55:47
and had switched from 3.7.1 to 3.7.0, using commands like
brew switch python3 3.7.0
brew switch python3 3.7.1
Anyway, am now on Python 3.7.3 whether I like it or not, and snapcraft is installed ok.