diff --git a/cellacdc/_run.py b/cellacdc/_run.py index d654ef0c..7654efdc 100644 --- a/cellacdc/_run.py +++ b/cellacdc/_run.py @@ -5,6 +5,7 @@ def _setup_gui(): from . import qrc_resources_path, qrc_resources_light_path + warn_restart = False # Force PyQt6 if available try: from PyQt6 import QtCore @@ -67,6 +68,7 @@ def _setup_gui(): subprocess.check_call( [sys.executable, '-m', 'pip', 'install', '-U', 'PyQt6'] ) + warn_restart = True break elif answer.lower() == 'n': raise e @@ -75,7 +77,7 @@ def _setup_gui(): f'"{answer}" is not a valid answer. ' 'Type "y" for "yes", or "n" for "no".' ) - + try: import pyqtgraph except ModuleNotFoundError: @@ -83,6 +85,7 @@ def _setup_gui(): subprocess.check_call( [sys.executable, '-m', 'pip', 'install', '-U', 'pyqtgraph'] ) + warn_restart = True try: import seaborn @@ -91,6 +94,13 @@ def _setup_gui(): subprocess.check_call( [sys.executable, '-m', 'pip', 'install', '-U', 'seaborn'] ) + warn_restart = True + + if warn_restart: + exit( + '[WARNING]: Cell-ACDC had to install the required GUI libraries. ' + 'Please, re-start the software. Thank you for your patience!' + ) def _setup_app(splashscreen=False, icon_path=None, logo_path=None): from qtpy import QtCore diff --git a/cellacdc/myutils.py b/cellacdc/myutils.py index 38b8efd2..2ff7787a 100644 --- a/cellacdc/myutils.py +++ b/cellacdc/myutils.py @@ -1506,6 +1506,9 @@ def _install_homebrew_command(): def _brew_install_java_command(): return 'brew install --cask homebrew/cask-versions/adoptopenjdk8' +def _brew_install_hdf5(): + return 'brew install hdf5' + def _apt_update_command(): return 'sudo apt-get update'