I have a script I want to be available globally. I\'ve started it with the standard hashbang:
#! /usr/bin/env python
And linked it into the
I faced the same problem and came up with this solution: https://github.com/jabbalaci/wpython. It's a script called "wpython" that calls your program with the local Python interpreter in your venv. Thus instead of "/Users/foo/environments/project/env/bin/python myscript.py" it's enough to write "wpython /path/to/myscript.py". A launcher script could look like this:
#!/usr/bin/env bash
cd /the/directory/where/myscript.py/is/located
wpython myscript.py