title: How to use pipenv in Python shell script?
body: <p>I needed a module for a shell script I've written in Python, so I used pipenv to install it. I can run the command fine using:</p>
  
  <pre><code>~$ pipenv run python3 foo
  </code></pre>
  
  <p>Now, if I want to just run <code>~$ foo</code> on the command line (fish shell on MacOS, homebrew installed), how do I invoke the pipenv environment in the shebang of my Python script? Or is there a better way?</p>