bpytop: [REQUEST] Don't use env in the script's shebang

Is your feature request related to a problem? Please describe. Currently you are using the python interpreter that is found first in the user’s path.

https://github.com/aristocratos/bpytop/blob/73eb150abe3150082488acd00f3968f330c2dc89/bpytop.py#L1

As a python developer who often changes (conda) environments, this won’t work. So I had to change the shebang to make it use a fixed interpreter (system’s interpreter on Ubuntu 18.04).

Describe the solution you’d like I think in this specific case it might be better to hardcode a specific interpreter here, for example /usr/bin/python3 on newer distros with a python version >= 3.6 or another interpreter. If we agree on this, I can add some automation in the Makefile to adapt this during installation and create a PR.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

I understand your arguments @wAuner, but I believe that you are the corner case here. If your development work requires you to constantly change your environment (this is what @aristocratos meant with “your own choices”), run bpytop in a new terminal with an untouched environment or setup an alias alias btop='/usr/bin/python3 <where your bpytop is>'.

I think even a system tool is allowed to expect an environment with working interpreter lookups.

edit: ninja’d, editing for clarity