-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy path__init__.py
More file actions
42 lines (34 loc) · 1.59 KB
/
__init__.py
File metadata and controls
42 lines (34 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from pathlib import Path
from ._version import __version__, version_info
# this must be the first import for auto-canvas detection
from .utils import loop # noqa
from .graphics import *
from .graphics.features import GraphicFeatureEvent
from .graphics.selectors import *
from .graphics.utils import pause_events
from .legends import *
from .tools import *
from .layouts import IMGUI
if IMGUI:
# default to imgui figure if imgui_bundle is installed
from .layouts import ImguiFigure as Figure
else:
from .layouts import Figure
from .widgets import ImageWidget
from .utils import config, enume
4284
rate_adapters, select_adapter, print_wgpu_report
if len(enumerate_adapters()) < 1:
from warnings import warn
warn(
f"WGPU could not enumerate any adapters, fastplotlib will not work.\n"
f"This is caused by one of the following:\n"
f"1. You do not have a hardware GPU installed and you do not have "
f"software rendering (ex. lavapipe) installed either\n"
f"2. Your GPU drivers are not installed or something is wrong with your GPU driver installation, "
f"re-installing the latest drivers from your hardware vendor (probably Nvidia or AMD) may help.\n"
f"3. You are missing system libraries that are required for WGPU to access GPU(s), this is "
f"common in cloud computing environments.\n"
f"These two links can help you troubleshoot:\n"
f"https://wgpu-py.readthedocs.io/en/stable/start.html#platform-requirements\n"
f"https://fastplotlib.readthedocs.io/en/latest/user_guide/gpu.html\n",
RuntimeWarning,
)