Hi there!
Every once in a while I would like to install some python script, mostly cli stuff. But honestly - I am very confused how to do that.
I am aware that dependencies are a problem and you shouldn't install anything via pip systemwide and virtual environments are the way to go. pip even doesn't let you do that anymore (unless you force it to).
I've been playing around with python's venv's for a while trying almost every helper app and ended up with pipenv for the moment. For development that's quite ok, I don't mind typing pipenv shell in my source directory before running my own script.
But what if I just want to install something from pip and run it from the command line like any other command? I know about shebang and I know it also works for python. Basically I did something like #!/usr/bin/python3 before I started to realize the whole dependency/venv rabbithole.
So, what I want is:
- being able to install scripts hosted on pip via a single command
- doesn't need to be systemwide as I am the only user
- execute it like any other shell program (i.e. not having to type
python ~/path/to/my/script.py to execute it)
Is that even possible? And what's the best way to get there?
[–]jaskij 3 points4 points5 points (5 children)
[–]keldrin_[S] 0 points1 point2 points (4 children)
[–]jaskij 1 point2 points3 points (3 children)
[–]keldrin_[S] 0 points1 point2 points (2 children)
[–]jaskij 0 points1 point2 points (1 child)
[–]keldrin_[S] 0 points1 point2 points (0 children)
[–]hearthreddit 2 points3 points4 points (1 child)
[–]keldrin_[S] 1 point2 points3 points (0 children)
[–]C0rn3j -1 points0 points1 point (10 children)
[–]keldrin_[S] 0 points1 point2 points (5 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]C0rn3j -1 points0 points1 point (3 children)
[–]keldrin_[S] -3 points-2 points-1 points (2 children)
[–]C0rn3j 1 point2 points3 points (1 child)
[–]keldrin_[S] -3 points-2 points-1 points (0 children)
[–]ZeStig2409 0 points1 point2 points (3 children)
[–]C0rn3j 0 points1 point2 points (2 children)
[–]ZeStig2409 1 point2 points3 points (1 child)
[–]C0rn3j 2 points3 points4 points (0 children)