this post was submitted on 06 Nov 2024
202 points (98.1% liked)

Programming

17522 readers
318 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

So I'm no expert, but I have been a hobbyist C and Rust dev for a while now, and I've installed tons of programs from GitHub and whatnot that required manual compilation or other hoops to jump through, but I am constantly befuddled installing python apps. They seem to always need a very specific (often outdated) version of python, require a bunch of venv nonsense, googling gives tons of outdated info that no longer works, and generally seem incredibly not portable. As someone who doesn't work in python, it seems more obtuse than any other language's ecosystem. Why is it like this?

(page 2) 50 comments
sorted by: hot top controversial new old
[–] Balinares@pawb.social 3 points 2 weeks ago

It... depends. There is some great tooling for Python -- this was less true only a few years ago, mind you -- but the landscape is very much in flux, and usage of the modern stuff is not yet widespread. And a lot of the legacy stuff has a whole host of pitfalls.

Things are broadly progressing in the right direction, and I'd say I'm cautiously optimistic, although if you have to deal with anything related to conda then for the time being: good luck, and sorry.

[–] ebc@lemmy.ca 2 points 2 weeks ago (1 children)

I'm no Python expert either and yeah, from an outsider's perspective it seems needlessly confusing. easy_install that's never been easy, pip that should absolutely be put on a Performance Improvement Plan, and now this venv nonsense.

You can criticize javascript's ridiculous dependencies all you want (left-pad?), but one thing that they absolutely got right is how to manage them. Everything's in node_modules and that's it. Yeah, you might get eleven copies of left-pad on your system, but you know what you NEVER get? Version conflicts between projects you're working on.

[–] moreeni@lemm.ee 1 points 2 weeks ago

Seriously. Those are EXACTLY the thoughts I had after I was forced to deal with Python after a ton of time writing projects in JS.

[–] DarkThoughts@fedia.io 2 points 2 weeks ago (2 children)

Tried to install Automatic1111 for Stable Diffusion in an Arch distrobox, and despite editing the .sh file to point to the older tarballed Python version as advised on Github, it still tells me it uses the most up to date one that's installed system wide and thus can't install pytorch. And that's pretty much where my personal knowledge ends, and apparently that of those (i.e. that one person) on Github. ¯\_(ツ)_/¯

Always funny when people urge you to ask for help but no one ends up actually helping.

[–] zaphodb2002@sh.itjust.works 2 points 2 weeks ago (1 children)

Lol this is exactly why I made this post. I ended up using ComfyUI instead which has other, different python issues, but I got it working (kinda, no GPU but it's fine it works)

[–] DarkThoughts@fedia.io 1 points 2 weeks ago

I definitely want gpu support. Although I struggle with that somewhat on Koboldcpp as well where I can't use ROCm, only Vulkan. Unsure where the difference is performance wise.

I'd like to try the other UIs too, but the problem is that Automatic1111 is where the majority of additional plugins can be found.

[–] tal@lemmy.today 1 points 2 weeks ago* (last edited 2 weeks ago)

despite editing the .sh file to point to the older tarballed Python version as advised on Github, it still tells me it uses the most up to date one that's installed system wide and thus can't install pytorch.

Can you paste your commands and output?

If you want, maybe on !imageai@sh.itjust.works, since I think that people seeing how to get Automatic1111 set up might help others.

I've set it up myself, and I don't mind taking a stab at getting it working, especially if it might help get others over the hump to a local Automatic1111 installation.

[–] vin@lemmynsfw.com 2 points 2 weeks ago

Yep, they are not portable, every app should come bundled with its own interpreter. As to why, I think historically it didn't target production grade application development.

[–] Die4Ever@programming.dev 1 points 2 weeks ago (5 children)

I'm not sure this can be really fixed with Python 3, maybe we just have to hope for Python 4

load more comments (5 replies)
load more comments
view more: ‹ prev next ›