-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy path__init__.py
More file actions
41 lines (33 loc) · 1.53 KB
/
__init__.py
File metadata and controls
41 lines (33 loc) · 1.53 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
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.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, enumerate_adapters, select_adapter, print_wgpu_report
if len(enumerate_adapters()) < 1:
from warnings import warn
warn(
"WGPU could not enumerate any adapters, fastplotlib will not work.\n"
"This is caused by one of the following:\n"
"1. You do not have a hardware GPU installed and you do not have "
"software rendering (ex. lavapipe) installed either\n"
"2. Your GPU drivers are not installed or something is wrong with your GPU driver installation, "
"re-installing the latest drivers from your hardware vendor (probably Nvidia or AMD) may help.\n"
"3. You are missing system libraries that are required for WGPU to access GPU(s), this is "
"common in cloud computing environments.\n"
"These two links can help you troubleshoot:\n"
"https://wgpu-py.readthedocs.io/en/stable/start.html#platform-requirements\n"
"https://fastplotlib.readthedocs.io/en/latest/user_guide/gpu.html\n",
RuntimeWarning,
)