{"id":26969,"library":"extractcode-libarchive","title":"extractcode-libarchive","description":"A ScanCode path provider plugin that provides a prebuilt native libarchive binary for archive extraction. Version 3.5.1.210531 is current. Release cadence is irregular, tied to ScanCode plugin updates.","status":"active","version":"3.5.1.210531","language":"python","source_language":"en","source_url":"https://github.com/nexB/scancode-plugins","tags":["scan","libarchive","binary","plugin","extraction"],"install":[{"cmd":"pip install extractcode-libarchive","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Required for plugin discovery within ScanCode","package":"plugincode","optional":false}],"imports":[{"note":"The package uses underscore, not dot notation in import paths.","wrong":"from extractcode.plugins import get_libarchive","symbol":"get_libarchive","correct":"from extractcode_libarchive import get_libarchive"},{"note":"No common wrong import known.","symbol":"LibarchiveExtractor","correct":"from extractcode_libarchive import LibarchiveExtractor"}],"quickstart":{"code":"from extractcode_libarchive import get_libarchive\n\n# Get path to the embedded libarchive binary\nlibarchive_path = get_libarchive()\nprint(libarchive_path)\n# Output: '/path/to/libarchive/binary'","lang":"python","description":"Retrieve the path to the prebuilt libarchive binary."},"warnings":[{"fix":"Install a library like `libarchive-c` (`pip install libarchive-c`) and use `ctypes` or the library's API to load the binary from the path returned by `get_libarchive()`.","message":"This package only provides a prebuilt binary. It does not include the libarchive Python bindings. You must separately install e.g., libarchive-c or pylibarchive to use the binary programmatically.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `from extractcode_libarchive import ...`","message":"The import path uses underscore (`extractcode_libarchive`) not dot (`extractcode.libarchive`). A common mistake is to assume it's a subpackage.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure `plugincode` is installed and the environment includes the ScanCode plugin registry.","message":"This plugin is packaged for use with ScanCode toolkit. Standalone usage may require additional setup for plugin discovery.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change import to `from extractcode_libarchive import ...`","cause":"Incorrect import path: using dot instead of underscore.","error":"ModuleNotFoundError: No module named 'extractcode.libarchive'"},{"fix":"Upgrade to latest version: `pip install --upgrade extractcode-libarchive`. Verify API docs.","cause":"Outdated version or incorrect import. The function may have been renamed or removed.","error":"AttributeError: module 'extractcode_libarchive' has no attribute 'get_libarchive'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}