Bird
0
0

You wrote this GitHub Actions step to install dependencies:

medium📝 Troubleshoot Q14 of 15
Flask - Deployment
You wrote this GitHub Actions step to install dependencies:
- name: Install dependencies
  run: pip install requirements.txt

Why does this step fail in your Flask CI/CD pipeline?
ABecause pip install cannot run in GitHub Actions
BBecause requirements.txt file is missing
CBecause the command should be 'pip install -r requirements.txt'
DBecause Python version is not specified
Step-by-Step Solution
Solution:
  1. Step 1: Identify the pip install syntax error

    The command 'pip install requirements.txt' tries to install a package named 'requirements.txt' instead of reading the file.
  2. Step 2: Correct the command syntax

    The correct command to install from a requirements file is 'pip install -r requirements.txt'. This flag tells pip to read the file.
  3. Final Answer:

    Because the command should be 'pip install -r requirements.txt' -> Option C
  4. Quick Check:

    Use '-r' flag to install from file = A [OK]
Quick Trick: Use 'pip install -r requirements.txt' to install dependencies [OK]
Common Mistakes:
MISTAKES
  • Omitting the '-r' flag
  • Assuming pip install can't run in CI
  • Blaming missing Python version

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes