Sunsetting Python 2 Support

Summary: Due to the end-of-life (EOL) of Python 2 in January 2020, Chainer and CuPy v7.0.0b3 (release planned in August 2019) will drop Python 2 support. Chainer and CuPy v6.x (current stable release branch) continue to support Python 2. Chainer v6.x will be supported at least until after the EOL of Python 2.

The Chainer Team has decided to drop Python 2 support in Chainer and CuPy (referred to collectively as “Chainer” in this post) v7.x releases. This decision was made considering the following facts:

  • Python 2 will become end-of-life (EOL) in January 2020.
  • Many scientific computation packages, including NumPy, which is one of the core dependency of Chainer, are planning or already started to drop support for Python 2.
  • The results of open-source users’ survey held in the forum (English and Japanese) indicated that only a small ratio of users are currently using Python 2 and most of them are planning to migrate to Python 3.
  • Supporting Python 2 and 3 in the same codebase requires effort, such as replicating Python 3 features in Python 2, including six in pull-request reviews, etc.

We will sunset Python 2 support on the following schedule:

  • In Chainer v7.0.0b3 (planned in August 2019), Python 2 will not be supported. It will still run on Python 2, but will give a warning when import chainer / import cupy commands are used in Python 2.
  • In Chainer v7.0.0b4 (planned in September 2019), Python 2 support will be removed, and the code will not run on Python 2.

Please note that Chainer v6.x (current stable) releases still support Python 2, so you can continue using current and future v6.x releases on Python 2 in your existing projects. Chainer v6.x will be supported at least until after the EOL of Python 2.

Chainer Family Products

  • ChainerMN (which is already merged to Chainer), ChainerCV, Chainer Chemistry, and ChainerUI will support Python 2 until EOL of Chainer v6.x series.
  • ChainerRL will drop Python 2 support in the near future (possibly next release, before the Chainer v6.x EOL) as the latest gym package (which ChainerRL depends on) no longer supports Python 2.
  • ONNX-Chainer and ChainerIO didn’t support Python 2 since the initial release.

About Chainer

Chainer is a Python-based, standalone open source framework for deep learning models. Chainer provides a flexible, intuitive, and high performance means of implementing a full range of deep learning models, including state-of-the-art models such as recurrent neural networks and variational autoencoders.

Recent Posts