From 0a91a9e695bce2868617be4563cdae1c905258c7 Mon Sep 17 00:00:00 2001 From: Martin Turoci Date: Tue, 27 Jun 2023 11:30:18 +0200 Subject: [PATCH] fix: Allow running wave university via venv/bin/wave-university command. --- university/README.md | 6 ++++++ university/h2o_wave_university/cli.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/university/README.md b/university/README.md index aa3e418672..a695ab5c12 100644 --- a/university/README.md +++ b/university/README.md @@ -13,7 +13,13 @@ Each lesson explains a single topic and shows a short demonstration example. The ## Installation ```sh +# Create a virtual env. +python -m venv venv +# Activate virtual env (.\venv\Scripts\activate for Windows) +venv/bin/activate +# Install h2o-wave-university. pip install h2o-wave-university +# Run it. wave-university ``` diff --git a/university/h2o_wave_university/cli.py b/university/h2o_wave_university/cli.py index 4edfbe99b7..0d9ce4a348 100644 --- a/university/h2o_wave_university/cli.py +++ b/university/h2o_wave_university/cli.py @@ -20,8 +20,8 @@ def main(): env = os.environ.copy() env['H2O_WAVE_PUBLIC_DIR'] = '/assets/@./h2o_wave_university/static/' + env['PATH'] += os.pathsep + os.path.dirname(sys.executable) try: subprocess.Popen(['wave', 'run', 'h2o_wave_university.university', '--no-reload'], cwd=sys.exec_prefix, env=env).communicate() except KeyboardInterrupt: pass - \ No newline at end of file