Scalene is a high-resolution, low-overhead profiler for Python that analyzes CPU, GPU, and memory usage, providing AI-powered optimization suggestions. It's actively developed with frequent releases, typically addressing bug fixes, performance improvements, and compatibility updates for various Python versions and ecosystems.
pip install scaleneVerified import paths — ran on the pinned version, not inferred.
Create a Python script (e.g., `my_script.py`) and then run Scalene from the command line using `python -m scalene my_script.py`. Scalene will generate a detailed profile in your terminal or an HTML report.
Ensure your Python environment is not 3.11.0. Upgrade to 3.11.1+ or use another compatible version (3.8, 3.9, 3.10, 3.12, etc.).
Upgrade to Scalene v2.2.1 or newer. This version includes a fix that handles conflicts by falling back to alternative tool IDs or the legacy `PyEval_SetTrace` tracer.
Upgrade to Scalene v2.2.1 or newer to ensure compatibility with TensorFlow 2.21 and later.
Upgrade to Scalene v2.1.2 or newer to resolve this issue. Version 2.1.2 fixed the Windows timer loop to use the actual configured sampling rate.
For general profiling, always prefer `python -m scalene <your_script.py> [args]` or use the Jupyter `%%scalene` magic. Use the programmatic API (`from scalene import scalene_profiler; scalene_profiler.start()`) for fine-grained control within specific code blocks.
If not installed, run `pip install scalene`. If already installed, verify your PATH includes the directory where pip installs executables (e.g., `~/.local/bin` on Linux/macOS or the `Scripts` folder in a virtual environment).
Install Scalene using `pip install scalene` in the Python environment you intend to use.
Install the appropriate Python development headers for your system. For Debian/Ubuntu: `sudo apt-get install python3-dev`. For Fedora: `sudo dnf install python3-devel`. On macOS, ensure Xcode command line tools are installed (`xcode-select --install`).
Try upgrading Scalene to the latest version (`pip install --upgrade scalene`), ensure your Python version is officially supported, or test it in a clean virtual environment. If the issue persists, report it to the Scalene developers with detailed system information.
No dependency data recorded yet.