title: How to properly install mypy inside a .venv and configure a tests framework | VSCode
body: <p>mypy is installed both globally(using <code>pip install mypy</code>) and locally(using Poetry's <code>[tool.poetry.dev-dependencies]</code> inside my projects root folder.</p>
  <p>Here's a tree of the root folder</p>
  <pre><code>project_root_folder
  │
  │   poetry.lock
  │   pyproject.toml
  ├───.mypy_cache
  │
  ├───.venv
  │
  ├───.vscode
  │
  ├───tests
  │
  └───project_folder
  </code></pre>
  <hr />
  <p>Partial problem :</p>
  <ul>
  <li>While <strong>NOT</strong> in a virtual environment, if I use <code>mypy --version</code> I get :</li>
  </ul>
  <p>&quot;pytest: The term 'pytest' is not recognized as a name of a cmdlet, function, script file, or executable program.
  Check the spelling of the name, or if a path was included, verify that the path is correct and try again.&quot;</p>
  <ul>
  <li>While <strong>inside an activated</strong> .venv, if I use <code>mypy --version</code> :</li>
  </ul>
  <p>It successfully reports mypy's version. In this case it was installed with <code>poetry install</code> as a dev dependency using a <code>pyproject.toml</code></p>
  <hr />
  <p>Main Problem :</p>
  <p>Even though <code>Python: Select Linter</code> finds mypy and it successfully creates a .mypy_cache inside my root folder, when I try to <code>Python: Configure Tests</code> there is no mypy framework/tool</p>
  <p><a href="https://i.stack.imgur.com/aX9Ul.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aX9Ul.jpg" alt="enter image description here" /></a></p>
  <hr />
  <p>TLDR</p>
  <ol>
  <li>How can I properly configure the framework of my tests folder to
  work with mypy?</li>
  <li>Why <code>where.exe mypy</code> and <code>mypy --version</code> don't work outside the
  virtual environment?</li>
  </ol>