'Syntax changed in qgis3 cand i don`t know how to change this code

how can i make this code work in qgis3?

canvas = iface.mapCanvas() canvas.mapRenderer().setProjectionsEnabled(True) canvas.mapRenderer().setDestinationCrs(QgsCoordinateReferenceSystem("EPSG:2154"))

Error



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source