From c309745e0473b0b5886783f79433be00d14c0b25 Mon Sep 17 00:00:00 2001 From: Tom Chapin Date: Mon, 12 Feb 2024 18:33:57 -0800 Subject: [PATCH] Prepend local PYTHONPATH in with the local folder during startup, to solve issues with local development of the python module --- 01OS/start.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/01OS/start.sh b/01OS/start.sh index 791fda5..fc7417f 100755 --- a/01OS/start.sh +++ b/01OS/start.sh @@ -1,5 +1,12 @@ #!/usr/bin/env bash +# Set python to prioritize the module files from the current directory +# If we don't do this, then the python interpreter will not be able to find the modules, +# and will throw an error like "ModuleNotFoundError: No module named '01OS'". +# If we solve the problem by pip installing the official 01OS package, then those +# modules will run instead of the local ones that we are trying to develop with. +export PYTHONPATH="$(pwd):$PYTHONPATH" + ### Import Environment Variables from .env SCRIPT_DIR="$(dirname "$0")" if [ ! -f "$SCRIPT_DIR/.env" ]; then