Post AXd1kcsXB9jMU995UW by xavdid@mastodon.social
(DIR) More posts by xavdid@mastodon.social
(DIR) Post #AXczPepaWarUYEdp3I by simon@fedi.simonwillison.net
2023-07-12T19:27:23Z
0 likes, 0 repeats
Python programmers: do you habitually use pipx to install new tools written in Python?
(DIR) Post #AXczipeMWZMhbjX984 by mattcen@aus.social
2023-07-12T19:30:38Z
0 likes, 0 repeats
@simon I have historically, but I've recently started trying out 'rye' instead.
(DIR) Post #AXd07ph7UoYOz8kEca by bitprophet@social.coop
2023-07-12T19:31:29Z
0 likes, 0 repeats
@simon voted yes, but really it's "I _sometimes_ use pipx” - a lot of the time I'll still just regular-pip install into an appropriate virtualenv, because lazy or because reasons
(DIR) Post #AXd0KlUmQ3DXj78hjU by holst@mastodon.cloud
2023-07-12T19:33:15Z
0 likes, 0 repeats
@simon I used to! Now I use nix.
(DIR) Post #AXd0mbbslaSRAxjkQq by siddhantgoel@mastodon.social
2023-07-12T19:36:50Z
0 likes, 0 repeats
@simon I prefer using the OS package manager and use pipx if the package manager doesn’t have what I need.
(DIR) Post #AXd1GNIuWK8vUh3f9M by marcin_sawicki@social.abstractionleak.com
2023-07-12T19:44:34Z
0 likes, 0 repeats
@simon Huh, discovered it just now. Thanks
(DIR) Post #AXd1kcsXB9jMU995UW by xavdid@mastodon.social
2023-07-12T19:53:32Z
0 likes, 0 repeats
@simon brew is preferred, but pipx is great for things not big enough to be there. I do prefer local installs for project-specific tools (like pytest, where I just have many copies of it on my computer). But for general purposes utilities that happen to be written in Python, pipx is perfect.
(DIR) Post #AXd2SfsdNdWUXJCEIy by mistersql@mastodon.social
2023-07-12T19:59:12Z
0 likes, 0 repeats
@simon If it is in python and has a CLI interface, it should be installed with pipx unless you enjoy trouble shooting incompatible libraries. If the tool needs to be able to run `import yourcode`, such as mypy, pydoc, pytest, then you can't install with pipx.It is still sort of intermediate still level to realize why it should matter & getting pipx itself installed in the first place (or worse trying to update/replace the python that all the pipx apps are using)
(DIR) Post #AXd2fnId6gO5JMbyCG by djvdq@mastodon.social
2023-07-12T19:59:23Z
0 likes, 0 repeats
@simon I use it, but rarely. I have maybe 2-3 tools installed using it.
(DIR) Post #AXd5MjUBMTPvqNcL8y by sil@mastodon.social
2023-07-12T20:34:15Z
0 likes, 0 repeats
@simon no. Applications should not be distributed through programming language library distribution mechanisms. I should not have to care which language an application is written in, in my opinion. Libraries obviously yes; I’m using them for programming, so I care about the implementation. Applications, definitely not. If someone ports their app to a different language, would you expect the way you install it to change? Sorry to the pipx team, but I think the concept is wrong.
(DIR) Post #AXd6X4UyBvxJrbTnXs by webology@mastodon.social
2023-07-12T20:47:02Z
0 likes, 0 repeats
@simon voted yes but it's only for globally installed tools.
(DIR) Post #AXd6wgOqPecMeSpKT2 by ethantyping@hachyderm.io
2023-07-12T20:49:11Z
0 likes, 0 repeats
@simon for me it depends on environment: locally on my own machine? Absolutely! If I'm accessing a machine that I haven't set up, I generally don't.
(DIR) Post #AXd7OsCY7zPjMWWBzE by yakky@mastodon.social
2023-07-12T20:54:36Z
0 likes, 0 repeats
@simonpipx it's a great way to install tools like pre-commit, inv, tox which are meant to be globally available or you may want to use independently from a specific project/environment
(DIR) Post #AXdEmWgkSmu9GorxM8 by jpetazzo@hachyderm.io
2023-07-12T21:54:58Z
0 likes, 0 repeats
@simon I just started using it because I'm on Arch Linux and it's no longer possible to "pip install" as a user; and I like it so far :)
(DIR) Post #AXdEzngWaAjnkS5tlg by simon@fedi.simonwillison.net
2023-07-12T22:19:30Z
0 likes, 0 repeats
@sil I've started releasing my tools for Homebrew as well as pip/pipx - see https://github.com/simonw/homebrew-llm - but I don't really know how I'd start doing that for other OSsA lot of these tools like strip-tags feel too tiny to warrant the extra effort, but I want people to be able to use them!
(DIR) Post #AXdFQcLQqwzWOc12H2 by simon@fedi.simonwillison.net
2023-07-12T22:23:33Z
0 likes, 0 repeats
For the 28% who don't know pipx yet, I really like it: it's a tool for installing Python CLI utilities that gives them their own hidden virtual environment for their dependencies and then adds the tool itself to your PATH - so you can install stuff without worrying about it breaking anything elsepipx install sqlite-utilspipx install datasettepipx install llm Etc https://pypa.github.io/pipx/
(DIR) Post #AXdFcoCMbgwIdPaT68 by sil@mastodon.social
2023-07-12T22:25:52Z
0 likes, 0 repeats
@simon yeah. There's not really a good answer here. The homebrew people want that to be the cross-platform answer to this, I think, but it's just not right off the Mac. AWS tried to tell people to install the CLI with brew on Linux and got, correctly, much pushback. Distributing to multiple OSes is hard work; using language-specific stuff is wrong (why is app1 in pipx and app2 in composer?) but OS-specific stuff is much effort to publish in. This is why people do the terrible curl|bash thing.
(DIR) Post #AXdFpXMEX2e0AVGzWS by simon@fedi.simonwillison.net
2023-07-12T22:29:49Z
0 likes, 0 repeats
@sil I cannot bring myself to do the curl bash thing!
(DIR) Post #AXdGGybHLuNqTkOWdE by sil@mastodon.social
2023-07-12T22:31:51Z
0 likes, 0 repeats
@simon this is wholly correct behaviour :)
(DIR) Post #AXdGi5937xciaz7DVo by xek@hachyderm.io
2023-07-12T22:39:55Z
0 likes, 0 repeats
@simon … except anything else that depends on binaries in ${PATH}.Call me a grumpy old fart, but I have a Dockerfile for pretty much every non-trivial thing I've built in the last 5 years. Everyone who uses it gets the exact same environment, with the exact same deps, etc etc etc.But I'm also someone who pins requirements.txt entries to versions, after having dealt with Rails apps in last half of the 00s.
(DIR) Post #AXdHG4To6hAcNW22tM by nicr9@techhub.social
2023-07-12T22:47:24Z
0 likes, 0 repeats
@simon I'm going to need to test this later with ansible's pip module...It's got a param for executable path so I may be able to trick it to using pipx instead which would be neat!
(DIR) Post #AXdHhQOSjwd2A4Zj1c by simon@fedi.simonwillison.net
2023-07-12T22:49:21Z
0 likes, 0 repeats
@phil I use Python installed via Homebrew, then pipx for global tools and individual virtual environments manages with pipenv for all of my projectsI'm not a huge fan of pipenv, I just want something that gives me a virtualenv for my current directory where the environment itself is elsewhere on my machine
(DIR) Post #AXdHrn9SyrgzdlVKQD by simon@fedi.simonwillison.net
2023-07-12T22:50:48Z
0 likes, 0 repeats
@phil I need that because I keep all of my projects in Dropbox (for insurance against having my laptop snatched before I've done a "git push") and I don't want to fill my Dropbox with hundreds of venv directories!
(DIR) Post #AXdKoBZKYXOg4aZegC by benschwarz@front-end.social
2023-07-12T23:26:26Z
0 likes, 0 repeats
@simon this will be really helpful. I’m not a python person and only have to roll it out for tooling. It’s always a pain in the ass, because who wants to understand the intricacies of the best package management abstraction for a cli. Pipx all day!
(DIR) Post #AXdXEDTNIa5sxOy1eC by hobs@mstdn.social
2023-07-13T01:45:07Z
0 likes, 0 repeats
@simonPowerful #Python !! Thank you.
(DIR) Post #AXdhle6SJ8sOeCpH2O by lewiscowles1986@phpc.social
2023-07-13T03:44:20Z
0 likes, 0 repeats
@simon are No and I don't know how to mutually exclusive?
(DIR) Post #AXdjLKbMOJxyXlrSzY by thelonelyghost@tech.lgbt
2023-07-13T04:01:56Z
0 likes, 0 repeats
@simon also of note, for tools that require a shared environment (I.e., plugins for a given command) there is `pipx inject`pipx install awsumepipx inject awsume awsume-console-plugin
(DIR) Post #AXdjktht0Xxwf06YiW by thelonelyghost@tech.lgbt
2023-07-13T04:03:29Z
0 likes, 0 repeats
@simon @phil brave! I kept running into issues with `brew update` upgrading Python to a new version and breaking all of my venvs
(DIR) Post #AXdpuYJG15PCv1ZW4m by hynek@mastodon.social
2023-07-13T05:15:28Z
0 likes, 0 repeats
@simon the voting results are heart-breaking and a major reason why people still complain about problems in Python packaging that have been solved years ago. :(
(DIR) Post #AXds1ocnxGUzSHJ2Nk by partizan@mstdn.social
2023-07-13T05:39:11Z
0 likes, 0 repeats
@simon the time only problem with it - all those tools are broken after a major python update.
(DIR) Post #AXeJqUwBbpw9vWlOCG by itsthejoker@fosstodon.org
2023-07-13T10:50:48Z
0 likes, 0 repeats
@simon @phil out of curiosity, why brew and not pyenv?
(DIR) Post #AXef3fYpWOUPfzxc1I by hruske@mastodon.green
2023-07-13T14:48:25Z
0 likes, 0 repeats
@simon Debian Bookworm release notes recommend using pipx to install non-Debian provided Python based tools.https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#python3-pep-668
(DIR) Post #AXefYfBuwgBFVW1S9A by chmp@hachyderm.io
2023-07-13T06:54:08Z
0 likes, 0 repeats
@hynek @simon to be honest: I've been bitten enough times by third party tools in the python ecosystem that solved packing one way or the other, that I now try to stick as much as possible to plain venvs. I really wished there was an "official" answer to packaging. But then again, I saw some post of yet another tool introducing upper version bounds for their cli. So I guess I'm in the market for a way to install cli tools separate to the rest of my packages :D
(DIR) Post #AXefYfzBzTazyL4nx2 by pfmoore@mastodon.social
2023-07-13T09:14:44Z
0 likes, 0 repeats
@chmp @hynek @simon What would count as "official" to you? Would it need to be shipped with python?
(DIR) Post #AXefYgqimSPieM7YO0 by simon@fedi.simonwillison.net
2023-07-13T14:54:13Z
0 likes, 0 repeats
@pfmoore @chmp @hynek I would absolutely love to see it shipped with PythonI want to be able to tell people to run "python -m pipx install sqlite-utils" in my READMEs without first having to explain pipx to them
(DIR) Post #AXefjqRTSHOPaRdA6i by simon@fedi.simonwillison.net
2023-07-13T14:56:13Z
0 likes, 0 repeats
@itsthejoker @phil honestly mainly because I'm impatient and I don't like waiting for Python to installPlus I try to use the tools I encourage other people to use, and I don't like having to coach Python newcomers through getting a C compiler working first!
(DIR) Post #AXejvtcbrJIwjvqDOi by austinfromboston@mastodon.social
2023-07-13T15:43:21Z
0 likes, 0 repeats
@simon asdf is like this but for pretty much anything you need to install
(DIR) Post #AXesrUDtFQeoOdFcau by pfmoore@mastodon.social
2023-07-13T17:21:46Z
0 likes, 0 repeats
@simon My question was more to @chmp - I'm never quite sure what people mean when they say they want something "official". There's a lot of practical difficulties with adding pipx to the stdlib. And it's already a PyPA project. So what *else* can we do to help adoption?
(DIR) Post #AXh7L8oHDH3ALYE0Se by djvdq@mastodon.social
2023-07-14T19:14:39Z
0 likes, 0 repeats
@simon I haven't heard about pipenv before, but I also wanted to have venvs in different place than projects itself, so I wrote small tool for myself to have all venvs in one place somewhere in $HOME and I've also overwritten "cd" command to activate and deactivate proper venv based on the path.
(DIR) Post #AXh8ATJUk0i6hpIrtQ by Lleites@fosstodon.org
2023-07-14T19:23:52Z
0 likes, 0 repeats
@simon I love pipx
(DIR) Post #AXhPq3Bdy4s33i2j9E by mgiacomo@fediscience.org
2023-07-14T22:42:12Z
0 likes, 0 repeats
@simon thanks! So the difference with poetry is the PATH thing?