Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix python_version in show_env.sh when its meets python3. (#9894)

湛露先生9b724b3b5efd
diff --git a/show_env.sh b/show_env.sh
index 83c47635cb..84e37b3d7a 100644
--- a/show_env.sh
+++ b/show_env.sh
@@ -41,12 +41,7 @@ else
fi
# get python version
-python_version=''
-if command -v python &> /dev/null; then
- python_version=$(python --version | cut -d ' ' -f2)
-else
- python_version="Python not installed"
-fi
+python_version=$(python3 --version 2>&1 || python --version 2>&1 || echo "Python not installed")
# Print all information
echo "Current Repository: $git_repo_name"