Browse Source

direct package installation instructions
until we tested the nicegui[extra] in final pip package

Rodja Trappe 1 year ago
parent
commit
893a458899
2 changed files with 5 additions and 4 deletions
  1. 1 1
      nicegui/native_mode.py
  2. 4 3
      nicegui/ui.py

+ 1 - 1
nicegui/native_mode.py

@@ -42,7 +42,7 @@ def open_window(
         webview.start(storage_path=tempfile.mkdtemp(), **globals.app.native.start_args)
     except NameError:
         logging.error('''Native mode is not supported in this configuration.
-Please run "pip install nicegui[native] to use it.''')
+Please run "pip install pywebview" to use it.''')
         sys.exit(1)
 
 

+ 4 - 3
nicegui/ui.py

@@ -176,6 +176,7 @@ try:
     __all__.append('plotly')
 except ImportError:
     def plotly(*args, **kwargs):
+        raise ImportError('Plotly is not installed. Please run "pip install plotly".')
         raise ImportError('Plotly is not installed. Please run "pip install nicegui[plotly]".')
 
 if os.environ.get('MATPLOTLIB', 'true').lower() == 'true':
@@ -186,10 +187,10 @@ if os.environ.get('MATPLOTLIB', 'true').lower() == 'true':
         __all__.extend(['line_plot', 'pyplot', 'plot'])
     except ImportError:
         def line_plot(*args, **kwargs):
-            raise ImportError('Matplotlib is not installed. Please run "pip install nicegui[matplotlib]".')
+            raise ImportError('Matplotlib is not installed. Please run "pip install matplotlib".')
 
         def pyplot(*args, **kwargs):
-            raise ImportError('Matplotlib is not installed. Please run "pip install nicegui[matplotlib]".')
+            raise ImportError('Matplotlib is not installed. Please run "pip install matplotlib".')
 
         def plot(*args, **kwargs):
-            raise ImportError('Matplotlib is not installed. Please run "pip install nicegui[matplotlib]".')
+            raise ImportError('Matplotlib is not installed. Please run "pip install matplotlib".')