extractcode-7z
raw JSON → 16.5.210531 verified Fri May 01 auth: no python maintenance
A ScanCode path provider plugin that provides a prebuilt native sevenzip binary for archive extraction. Version 16.5.210531. Plugin is in maintenance mode, tied to ScanCode toolkit releases.
pip install extractcode-7z Common errors
error ModuleNotFoundError: No module named 'extractcode_7z' ↓
cause Package not installed or wrong Python environment.
fix
Run
pip install extractcode-7z and ensure you are in the correct virtual environment. error AttributeError: module 'extractcode_7z' has no attribute 'SevenZipProvider' ↓
cause Incorrect import path or outdated version.
fix
Use
from extractcode_7z import SevenZipProvider (note underscore). Check version: pip show extractcode-7z should be >=16.0. Warnings
breaking extractcode-7z is a path provider plugin; do not import it as a standalone extraction library. It only provides the binary path. ↓
fix Use extractcode (from scancode-toolkit) for actual extraction, or call the binary directly via SevenZipProvider.get_sevenzip_path().
deprecated Project is in maintenance mode. No new features; only critical security updates. ↓
fix Consider using py7zr for pure-Python 7z support if you need active development.
gotcha Bundled binary is platform-specific. Install the correct wheel for your OS; otherwise import may fail. ↓
fix Run `pip install extractcode-7z` without extras; pip selects the proper wheel automatically. On some systems, ensure 7z is not already in PATH to avoid confusion.
Imports
- SevenZipProvider wrong
from extractcode.sevenzip import SevenZipProvidercorrectfrom extractcode_7z import SevenZipProvider
Quickstart
from extractcode_7z import SevenZipProvider
provider = SevenZipProvider()
print(provider.get_sevenzip_path())