@@ -220,6 +220,19 @@ get_python_cmd() {
220220 echo " "
221221}
222222
223+ # Find the system platform (linux, macos, windows)
224+ # Contributed by @rnjema (PR #1105)
225+ get_platform () {
226+ local uname_out
227+ uname_out=$( uname -s)
228+ case " ${uname_out} " in
229+ Linux* ) echo " linux" ;;
230+ Darwin* ) echo " macos" ;;
231+ CYGWIN* |MINGW* |MSYS* ) echo " windows" ;;
232+ * ) echo " unknown" ;;
233+ esac
234+ }
235+
223236# ============================================================================
224237# Pre-flight Checks
225238# These run before any installation to catch problems early
@@ -266,6 +279,7 @@ check_prerequisites() {
266279
267280 # Check for Python 3.10+
268281 PYTHON_CMD=$( get_python_cmd)
282+ PLATFORM=$( get_platform)
269283 if [ -n " $PYTHON_CMD " ]; then
270284 # We know it's good because get_python_cmd validates it, but we run check again to get the version string
271285 PY_VERSION=$( check_python_version " $PYTHON_CMD " )
@@ -293,6 +307,11 @@ check_prerequisites() {
293307 fi
294308 fi
295309
310+ # Show Windows-specific guidance (contributed by @rnjema)
311+ if [ " $PLATFORM " = " windows" ]; then
312+ print_info " Windows detected - using Git Bash/WSL compatible mode"
313+ fi
314+
296315 if [ $errors -gt 0 ]; then
297316 echo " "
298317 print_error " Missing prerequisites. Please fix the issues above."
@@ -472,26 +491,27 @@ do_install() {
472491
473492 # -------------------------------------------------------------------------
474493 # Step 3: Install dependencies
494+ # Uses $PYTHON_CMD -m pip for reliability (contributed by @rnjema)
475495 # -------------------------------------------------------------------------
476496 echo -e " ${BLUE} [3/4]${NC} Installing dependencies..."
477497
478498 # Upgrade pip first
479- pip install --upgrade pip -q 2> /dev/null &
499+ $PYTHON_CMD -m pip install --upgrade pip -q 2> /dev/null &
480500 local pip_pid=$!
481501 spin $pip_pid " Upgrading pip..."
482502 wait $pip_pid
483503
484504 # Install from requirements.txt
485505 if [ -f " requirements.txt" ]; then
486506 total_pkgs=$( grep -c -E " ^[^#]" requirements.txt 2> /dev/null || echo " ?" )
487- pip install -r requirements.txt -q 2> /dev/null &
507+ $PYTHON_CMD -m pip install -r requirements.txt -q 2> /dev/null &
488508 local req_pid=$!
489509 spin $req_pid " Installing $total_pkgs packages..."
490510 wait $req_pid
491511 fi
492512
493513 # Install TinyTorch package in editable mode (includes tito CLI)
494- pip install -e . -q 2> /dev/null &
514+ $PYTHON_CMD -m pip install -e . -q 2> /dev/null &
495515 local tt_pid=$!
496516 spin $tt_pid " Installing TinyTorch..."
497517 wait $tt_pid
0 commit comments