{"id":24829,"library":"wgpu","title":"wgpu","description":"WebGPU for Python: a Python implementation of the WebGPU API, enabling modern GPU compute and rendering on multiple backends (Vulkan, Metal, D3D12, OpenGL). Current version 0.31.0. Requires Python >=3.10. Releases roughly monthly.","status":"active","version":"0.31.0","language":"python","source_language":"en","source_url":"https://github.com/pygfx/wgpu-py","tags":["gpu","webgpu","compute","graphics"],"install":[{"cmd":"pip install wgpu","lang":"bash","label":"latest stable"}],"dependencies":[],"imports":[{"wrong":"from wgpu import request_adapter","symbol":"request_adapter","correct":"from wgpu import request_adapter"}],"quickstart":{"code":"import wgpu\nimport wgpu.backends.wgpu_native  # triggers auto backend selection\n\nadapter = wgpu.request_adapter(canvas=None, power_preference=\"high-performance\")\ndevice = adapter.request_device(required_features=[])\nprint(f\"Adapter: {adapter.summary}\")\nprint(f\"Device: {device.summary}\")","lang":"python","description":"Initialize wgpu, request adapter and device. In real usage, provide a canvas from wgpu.gui."},"warnings":[{"fix":"Replace `from wgpu.backend.wgpu_native import ...` with `import wgpu` and use `wgpu.request_adapter`.","message":"Import path changed in v0.10.0: previously `import wgpu.backend.wgpu_native` is no longer needed; use `import wgpu` and call `wgpu.request_adapter()`.","severity":"breaking","affected_versions":">=0.10.0"},{"fix":"Change import to `from wgpu.gui.auto import WgpuCanvas`.","message":"GUI canvas module restructured in v0.15.0: `from wgpu.gui import WgpuCanvas` no longer works; use `from wgpu.gui.auto import WgpuCanvas`.","severity":"breaking","affected_versions":">=0.15.0"},{"fix":"Install appropriate GPU drivers or test with `wgpu.request_adapter` to see available adapters.","message":"The `wgpu` library bundles wgpu-native binaries. On some platforms (e.g., Linux without Vulkan drivers) it may fall back to OpenGL or silently fail. Test on target hardware.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.31.0':27 '3.10':30 'api':11 'backend':20 'comput':15,36 'current':25 'd3d12':23 'enabl':12 'gpu':14,34 'graphic':37 'implement':7 'metal':22 'modern':13 'month':33 'multipl':19 'opengl':24 'python':4,6,29 'releas':31 'render':17 'requir':28 'rough':32 'version':26 'vulkan':21 'webgpu':2,10,35 'wgpu':1","created_at":"2026-05-01T08:15:08.533535+00:00","updated_at":"2026-05-01T08:15:08.533535+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'request_adapter' from 'wgpu' (/tmp/tmp0t_splbo/venv/lib/python3.12/site-packages/wgpu/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.31.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://wgpu-py.readthedocs.io","github":"https://github.com/pygfx/wgpu-py","docs":"https://wgpu-py.readthedocs.io","changelog":null,"pypi":"https://pypi.org/project/wgpu/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}