Possible incorrect shebang on macOS
General information. Describe your environment
-
Versions
- Operating system: macOS 12.3.1
- Browser: Firefox 100
- PassFF: 1.14
- Host app: 1.2.3
-
How have you installed the host app?
curl -sSL github.com/passff/passff-host/releases/latest/download/install_host_app.sh | bash -s -- firefox
- Your preferences
- In the host app
passff.py:
- In the host app
[defaults]
Describe objectively your problem
I was getting the standard connecting error described under Troubleshooting. The debugging steps described there didn't turn up anything unusual.
But I noticed that the shebang in passff.py was hard-coding the path to the pyenv shim for python3 -- i.e., something like #!/Users/username/.pyenv/shims/python3. When I tried to execute passff.py with that shebang, I got errors indicating that the wrong interpreter was being used: the import statements at the beginning of the file were all erroring out.
Changing the shebang to #!/usr/bin/env python3 fixed everything, and I'm now a happy passff user.
Should #!/usr/bin/env python3 be the default shebang for macOS? Have I done something wrong by changing that?
I had exactly the same problem! changing to system-python #!/usr/bin/python3 worked for me. I think in my pyenv global python are some missing dependencies...
Same issue here in 2023. Changed the path to #!/usr/bin/env python3 and finally got it working.
I don't understand why you would want to use a different python version than the one that you can find using which python3 (which is what the install script currently does). I think, instead of changing PassFF's install scripts, you should rather investigate why your system returns /Users/username/.pyenv/shims/python3 on which python3 if that's not really the Python executable you prefer.
I second to '#!/usr/bin/env python3'. In *BSD, python packages which are not in base are installed into /usr/local/bin while base in /usr/bin. The env command could handle this condition.