Though AI is a powerful tool for society, the computational power required can have a negative environmental impact. Mila, BCG GAMMA, Haverford College, and Comet.ml today released CodeCarbon, an open-source software package to estimate the amount of CO2 produced by the computing resources used to execute the code to incentivize developers to optimize their code efficiency. It also advises developers on how they can reduce emissions by selecting their cloud infrastructure in regions that use lower carbon energy sources.