title: Conda and pre-commit, error: Library stubs not installed for "requests" (or incompatible with Python 3.10)
body: <h2>Error message</h2>
  <p>While using a conda environment and <code>pre-commit</code> I receive the error:</p>
  <pre><code>error: Library stubs not installed for &quot;requests&quot; (or incompatible with Python 3.10)
  </code></pre>
  <p>The full error message is:</p>
  <pre><code>rc/export_data/plantuml_get_package.py:69: error: Library stubs not installed for &quot;requests&quot; (or incompatible with Python 3.10)
  src/export_data/plantuml_get_package.py:69: note: Hint: &quot;python3 -m pip install types-requests&quot;
  src/export_data/plantuml_get_package.py:69: note: (or run &quot;mypy --install-types&quot; to install all missing stub packages)
  src/export_data/plantuml_get_package.py:69: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
  Found 1 error in 1 file (checked 24 source files)
  </code></pre>
  <p>The default solution is given in the error message:</p>
  <pre><code>mypy --install-types
  </code></pre>
  <p>However, the requirement is already satisfied:</p>
  <pre><code>Installing missing stub packages:
  /usr/bin/python3 -m pip install types-requests
  
  Install? [yN] y
  
  Defaulting to user installation because normal site-packages is not writeable
  Requirement already satisfied: types-requests in /usr/lib/python3/dist-packages (2.25)
  </code></pre>
  <h2>Conda Yaml</h2>
  <p>This would suggest it may be installed on the device, but not in the conda environment, however, it should be, because the following conda environment is created successfully (last 2 lines):</p>
  <pre><code># run: conda env create --file environment.yml
  # include new packages: conda env update --file environment.yml
  name: someenvironment
  channels:
    - conda-forge
    - conda
  dependencies:
  # Specify specific python version.
  - python=3.10
  - anaconda
  - nb_conda
  - conda:
  # Run python tests.
    - pytest=6.1.2
  # Convert notebooks to pdf.
    - nbconvert
    - matplotlib
  # Support notebooks.
    - nb_conda
  # Visualise graphs for PlantUML
    - graphviz
  # Run graph software quickly
    - networkx
  - pip
  - pip:
  # Compile pdf from python.
    - pdflatex
  # Write unit tests on Jupyter notebooks.
    - testbook
  # Auto generate docstrings
    - pyment
  # Auto generate documentation.
    - pdoc3
  # Code formatting compliance
    - black
  # Generate diagrams.
    - plantuml
  # Identify and remove dead code.
    - vulture
  # Get PlantUML .jar file.
    - requests
    - types-requests
  </code></pre>
  <h2>Question</h2>
  <p>So I was wondering, how can I ensure the <code>mypy</code> recognizes the <code>types-requests</code> package in the environment?</p>