title: Python Module not found despite being installed
body: <p>I am trying to tell pandoc to use a custom pandocfilter written in python. I am on a MacBook M1 and therefore there is a 2.7 and a homebrewed 3.9.7 version of python installed.</p>
  <p>For some reason the pandocfilter module is not found despite being installed correctly.</p>
  <p>This is the script I'm trying to use:</p>
  <pre><code>#!/usr/bin/env python3
  
  from pandocfilters import toJSONFilter, Str
  import re
  
  def replace(key, value, format, meta):
      if key == 'Str':
          if '[[' in value:
              new_value = value.replace('[[', '')
              return Str(new_value)
          if ']]' in value:
              new_value = value.replace(']]', '')
              return Str(new_value)
  
  if __name__ == '__main__':
      toJSONFilter(replace)
  </code></pre>
  <p><code>/usr/bin/env python3</code> points to the correct python version so I have no clue where the issue may be.</p>
  <p>I'm looking forward for any help!</p>