Upgrade Anaconda for latest Python

Related: Why upgrade to Python 3.7?

Python 3.7 is the default in Anaconda Python. Upgrade to Python 3.7 by

conda install python=3.7

Python 3.7 interesting functionality including:

  • pathlib in stdlib. This gets rid of typical use of verbose and awkward os.path functions.
  • f-strings, which allow f'This is {weight} kg for {price} dollars. instead of 'This is {} kg for {} dollars'.format(weight,price)
  • UTF8 from the command line e.g. for argparse

MacOS Tcl/Tk

Batteries-included Tcl/Tk for MacOS ≥ 10.9 (Mavericks). This is an important convenience for CPython users, who previously had to make a separate install.

GUI advice

In general and in particular for data science GUI applications, I recommend first using Jupyter as this will often be far less effort for a worthwhile GUI. GUIs have considerable overhead to maintain, and suffer bit rot far faster than the underlying code. At the very least, be sure your code is usable from the command line and/or as a plain importable module without requiring a graphics library. In stripped-down cloud / embedded applications, unused graphical imports cause stability problems and considerable startup lag.


Fix upgrade errors

If you get Anaconda package conflict errors upon upgrading Python, you might just move your existing Anaconda directory to a backup location, and reinstall Anaconda/Miniconda from scratch.

Python 3.7 Support

Every popular Python package supports Python 3.7. The Scipy stack and Spyder support includes pathlib. Most of my Python programs require Python ≥ 3.6.