Installing CodeCarbon¶
Python Support
We recommend using a supported Python version.
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
Using Conda environments¶
If you're using Conda for environment management, you can install CodeCarbon with pip in your Conda environment:
conda create --name codecarbon
conda activate codecarbon
pip install codecarbon
Conda Support
Starting from 3.3.0 we start to maintain again an official Conda packages on conda-forge:
conda install -c conda-forge codecarbon
The channel codecarbon is outdated.
Dependencies¶
The following packages are used by the CodeCarbon package, and will be installed along with the package itself:
arrow
click
pandas
prometheus_client
psutil
py-cpuinfo
nvidia-ml-py
rapidfuzz
requests
questionary
rich
typer
Please refer to pyproject.toml for the latest list of the packages used.
(Non-Python users) Standalone installer¶
If you are not using Python but would like to run CodeCarbon (for instance to use the CodeCarbon Command line), we provide a standalone installer.
Use curl to download and run the script:
curl -LsSf https://codecarbon.io/scripts/install.sh | sh
For Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://codecarbon.io/scripts/install.ps1 | iex"