Skip to content

Commit

Permalink
check python minor version (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmacer authored Oct 23, 2024
1 parent 4acbe40 commit a306792
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions computer-use-demo/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/bin/bash
PYTHON_MINOR_VERSION=$(python3 --version | awk -F. '{print $2}')

if [ "$PYTHON_MINOR_VERSION" -gt 12 ]; then
echo "Python version 3.$PYTHON_MINOR_VERSION detected. Python 3.12 or lower is required for setup to complete."
echo "If you have multiple versions of Python installed, you can set the correct one by adjusting setup.sh to use a specific version, for example:"
echo "'python3 -m venv .venv' -> 'python3.12 -m venv .venv'"
exit 1
fi

if ! command -v cargo &> /dev/null; then
echo "Cargo (the package manager for Rust) is not present. This is required for one of this module's dependencies."
echo "See https://www.rust-lang.org/tools/install for installation instructions."
Expand Down

0 comments on commit a306792

Please sign in to comment.