Upgrade Anaconda for latest Python

1 minute read

Related: Why upgrade to Python 3.7?


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

conda install python=3.6

Python 3.6 adds interesting functionality including:

  • pathlib added to stdlib. This gets rid of most 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

Python 3.6.5 has 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.

Notes

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.6 Support

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

Tags:

Categories:

Updated:

Leave a Comment