{"id":22980,"library":"whitebox","title":"WhiteboxTools Python","description":"WhiteboxTools Python is an advanced geospatial data analysis platform that provides Python bindings for the WhiteboxTools library. Version 2.3.6 is current, updated to WhiteboxTools Open Core v2.3.0+. The library bundles WhiteboxTools binaries automatically but allows optional download. Release cadence is irregular, with recent updates addressing bugs and dependency improvements.","status":"active","version":"2.3.6","language":"python","source_language":"en","source_url":"https://github.com/opengeos/whitebox-python","tags":["geospatial","gis","raster","lidar","whiteboxtools"],"install":[{"cmd":"pip install whitebox","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Optional: WhiteboxTools binaries are downloaded automatically if not bundled. Set WBT_LINUX or WBT_WIN to custom path.","package":"whitebox-whiteboxtools","optional":true}],"imports":[{"note":"'import whitebox' is valid but does not import the main class; you need to access whitebox.WhiteboxTools.","wrong":"import whitebox","symbol":"WhiteboxTools","correct":"from whitebox import WhiteboxTools"},{"note":"WhiteboxTools() is already instantiated as 'wbt' in the whitebox module; use 'from whitebox import wbt' for a ready-to-use instance.","wrong":"from whitebox import WhiteboxTools as wbt","symbol":"wbt","correct":"from whitebox import wbt"}],"quickstart":{"code":"from whitebox import wbt\nwbt.set_verbose_mode(True)\nwbt.feature_preserving_smoothing(\n    dem=\"/path/to/dem.tif\",\n    output=\"/path/to/smoothed.tif\",\n    filter=5,\n    norm_diff=0.5,\n    num_iter=3\n)\nprint(wbt.run_tool('feature_preserving_smoothing', ['-i=/path/to/dem.tif', '-o=/path/to/smoothed.tif', '--filter=5', '--norm_diff=0.5', '--num_iter=3']))","lang":"python","description":"Basic usage of WhiteboxTools via the pre-instantiated 'wbt' object. Replace file paths with actual datasets."},"warnings":[{"fix":"Verify tool names and parameters against WhiteboxTools v2.3.0+ documentation; update scripts accordingly.","message":"WhiteboxTools backend updated to v2.3.0; some tool names or parameters may have changed. Check WhiteboxTools changelogs if existing scripts fail.","severity":"breaking","affected_versions":"<2.3.0 -> >=2.3.0"},{"fix":"Set environment variable WBT_LINUX or WBT_WIN to the path of the whitebox_tools executable to skip download.","message":"WhiteboxTools binary is downloaded automatically on first use. If behind a proxy or without internet, set WBT_LINUX or WBT_WIN environment variable to a local binary path.","severity":"gotcha","affected_versions":"All"},{"fix":"Update any code relying on pkg_resources to use importlib.resources.","message":"pkg_resources is deprecated; replaced with importlib.resources in v2.3.6. Should not affect end-users but may break custom wrappers depending on pkg_resources.","severity":"deprecated","affected_versions":">=2.3.6"},{"fix":"Use the pre-instantiated 'wbt' from whitebox import wbt. Only create WhiteboxTools() if you need separate configurations.","message":"The 'wbt' object is a singleton instance of WhiteboxTools. Creating new instances (WhiteboxTools()) may cause conflicts if they share the same temporary directory.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Set the environment variable WBT_LINUX (or WBT_WIN on Windows) to the path of the whitebox_tools executable.","cause":"Automatic download failed (no internet, blocked, or wrong platform) and no local binary path is set.","error":"WhiteboxTools binary not found. Please set WBT_LINUX or WBT_WIN environment variable, or ensure an internet connection for automatic download."},{"fix":"Run 'pip install whitebox' to install the package.","cause":"The whitebox package is not installed.","error":"ModuleNotFoundError: No module named 'whitebox'"},{"fix":"Use 'from whitebox import WhiteboxTools' (capital C, class) or 'from whitebox import wbt' for the instance.","cause":"Using an older version (pre-2.x) or import statement inconsistent.","error":"AttributeError: module 'whitebox' has no attribute 'WhiteboxTools'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}