Pytest throwing flask not found error

When running the first unit test ticket for connection getting the below error

192-168-1-183:mflix-python sulagna.mukherjee$ pytest -m connection
ImportError while loading conftest ‘/Users/sulagna.mukherjee/mflix-python/tests/conftest.py’.
tests/conftest.py:2: in
from mflix.factory import create_app
mflix/factory.py:3: in
from flask import Flask, render_template
E ImportError: No module named flask

Hi @Dipanjan_12569,

Have you run pip install -r requirements.txt before starting the application. If not, please follow the steps in README lecture.

Kanika

All good now.

Actually I started a new session and the virtualenv lost the requirement.txt ,had to run the reuqirements.txt again to
start flask.

Thanks for your reply though

Dipanjan Mukherjee

Senior Data Engineer | ERTS

Mobile: +61 469 701 024

Australia and New Zealand Banking Group Ltd |
www.anz.com

1 Like