{"id":24558,"library":"scancode-toolkit","title":"ScanCode Toolkit","description":"ScanCode is a tool to scan code for license, copyright, package and their documented dependencies and other interesting facts. Current version: 32.5.0. Releases are frequent (every few weeks to months). Requires Python >=3.10.","status":"active","version":"32.5.0","language":"python","source_language":"en","source_url":"https://github.com/aboutcode-org/scancode-toolkit","tags":["license-scanning","open-source-compliance","dependency-detection"],"install":[{"cmd":"pip install scancode-toolkit","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Plugin system core","package":"pluggy","optional":false},{"reason":"SPDX license expression parsing","package":"license-expression","optional":false}],"imports":[{"note":"Scanner is the main CLI class; direct import from scancode.cli","wrong":"","symbol":"Scanner","correct":"from scancode.cli import Scanner"},{"note":"Used to generate JSON output","wrong":"","symbol":"JsonResults","correct":"from scancode.output import JsonResults"}],"quickstart":{"code":"import os\nfrom scancode.cli import Scanner\n\nscanner = Scanner()\nresults = scanner.scan('path/to/scan', options={'--license': True, '--copyright': True})\nprint(results.as_json())","lang":"python","description":"Basic scan for licenses and copyrights on a directory. The scanner returns a results object; call as_json() to get JSON output."},"warnings":[{"fix":"Update code and scripts to use new attribute names.","message":"Output format version bumped to 4.0.0 in v32.3.0. Attribute renames: 'is_resolved' -> 'is_pinned' in dependencies, 'spdx_license_expression' -> 'license_expression_spdx' in license matches.","severity":"breaking","affected_versions":">=32.3.0"},{"fix":"Add '--package-in-compiled' flag to your CLI options if you need to detect packages in compiled binaries.","message":"Binary package detection is now skipped by default. Use '--package-in-compiled' to scan packages in compiled binaries (rust/go). Previously these were detected under '--package'.","severity":"gotcha","affected_versions":">=32.5.0"},{"fix":"Upgrade Python to 3.10 or later.","message":"Python 3.9 wheels removed in v32.5.0; Python 3.7 dropped in v32.1.0.","severity":"deprecated","affected_versions":">=32.5.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install scancode-toolkit","cause":"Installing the wrong package or missing installed scancode-toolkit.","error":"ModuleNotFoundError: No module named 'scancode'"},{"fix":"Ensure the path exists and you pass valid options like '--license' and '--copyright' as a dictionary.","cause":"scan() returned None because of invalid path or missing options.","error":"AttributeError: 'NoneType' object has no attribute 'as_json'"},{"fix":"Upgrade scancode-toolkit to >=32.5.0","cause":"Using an older version of scancode that doesn't have that option.","error":"ValueError: Unknown option: --package-in-compiled"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}