Install mypy Create virtualenv python3 -m venv venv Activate venv # on linux source venv/bin/activate # on windows venv/Scripts/activate Install mypy pip install mypy Run mypy on a file: mypy practice1.py