Install ScanCode using pip

ScanCode can be installed from the public PyPI repository using pip which the standard Python package management tool.

Note

Note that pip installation method does work on ARM chips, i.e. Linux/MacOS on Apple M1 chips, as some non-native dependencies do not have pre-built wheels for ARM (like py-ahocorasick, intbitset). See Installation prerequisites for more information. See related issues for more info:

The steps are:

  1. Create a Python virtual environment

    /usr/bin/python3 -m venv venv
    

    To learn more about Python virtualenv, including installation and usage see this tutorial.

  2. Activate the virtual environment you just created

    source venv/bin/activate
    
  3. Run pip to install the latest versions of base utilities

    pip install --upgrade pip setuptools wheel
    
  4. Install the latest version of ScanCode

    pip install scancode-toolkit
    
  5. No errors? Congratulations! You are good to go to Running a scan.

Note

For advanced usage, scancode-toolkit-mini is an alternative package with no default dependencies on pre-built binaries. This may come handy for some special use cases such as packaging for a Linux or FreeBSD distro.

Uninstalling ScanCode

To uninstall ScanCode, run the following command.

pip uninstall scancode-toolkit