Installing CodeCarbon

Create a virtual environment using conda for easier management of dependencies and packages. For installing conda, follow the instructions on the official conda website

conda create --name codecarbon
conda activate codecarbon

From PyPi repository

The package is hosted on the pip repository here.

To install the package, run the following command in your terminal.

pip install codecarbon

From conda repository

The package is hosted on the conda repository here.

To install the package, run the following command in your terminal.

conda install -c codecarbon -c conda-forge codecarbon

Note

We recommend using Python 3.7 or above.

Dependencies

The following packages are used by the CodeCarbon package, and will be installed along with the package itself:

arrow
pandas
pynvml
requests
psutil
py-cpuinfo
click
rapidfuzz
prometheus_client

Please refer to setup.py for the latest list of the packages used.