[REQUEST] Don't use env in the script's shebang
See original GitHub issueIs 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.
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (7 by maintainers)
Top GitHub 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
Sorry for reviving an old issue - I was searching issues for “conda” to see if it was mentioned, before suggesting to add
conda
as an installation option.Anyway, I use
conda
forR
, not python, so if some app suddenly breaks when I change theconda
environment, I would be quite puzzled. I install your program as an “app”, not running it as some script. The name gives away how it was made, but for a user it still should not be affected by stuff like changing dev env, imho.On the other hand - I installed
bpytop
withconda
into the base env and it works even in sub-environments (just like other programs I use) so in my case I don’t see the issue. I was just trying to “translate” this issue from the point of view of an “app user”.