This extension converts python2 code in a notebook's code cell to python3 code. Under the hood, it uses Pythons build in 2to3 function.
The project was forked from code_prettify by @jfbercher, retaining most of the code. The 2to3 conversion is based on 2to3_nb.py by @takluyver and @fperez.
[//]: # (Possibly it will be extended to use the futurize functions so it can convert both ways.)
If you use jupyter-contrib-nbextensions, proceed as usual.
Otherwise, you can still install/try the extension from my personal repo, using
jupyter nbextension install https://github.com/EWouters/2to3_cell/archive/master.zip --user
jupyter nbextension enable 2to3_cell-master/2to3_cell
To remove
jupyter nbextension uninstall 2to3_cell-master/2to3_cell