9 ms·
Every time I see these things, they look cool as hell, I get excited, then I try to get them working on my gaming PC (that has the GPU), I spend 1-2h fighting w
by sabellito 1y ago
Every time I see these things, they look cool as hell, I get excited, then I try to get them working on my gaming PC (that has the GPU), I spend 1-2h fighting with python and give up.
Today's issue is that my python version is 3.12 instead of <3.12,>=3.9. Installing python 3.11 from the official website does nothing, I give up. It's a shame that the amazing work done by people like the OP gets underused because of this mess outside of their control.
"Just use docker". Have you tried using docker on windows? There's a reason I never do dev work on windows.
I spent most of my career in the JVM and Node, and despite the issues, never had to deal with this level of lack of compatibility.
- jhoho 1y agoLet me introduce you to the beautiful world of virtual environments. They save you the headache of getting a full installation to run, especially when using Windows. I prefer miniconda, but venv also does the job.
- regularfry 1y agoVirtual environments with venv don't answer the python version problem unless you throw another tool into the mix.
- underdeserver 1y agoHmm? My venvs do include the Python version (via symlink to /bin). Don't yours?
- diggan 1y agoIf you use something like uv (expanded here: https://news.ycombinator.com/item?id=43904078 https://news.ycombinator.com/item?id=43904078), I think it does. But if you just do `python -m venv .venv`, you get the specific version you used to create the virtual environment with. Some OSes seem to distribute binaries like `python3.8`, `python3.9` and so on so you could do `python3.8 -m venv .venv` to look one env to a specific version, but a bit of a hassle.
- regularfry 1y agoThe GP's problem was (apparently) an inability to install the right python version, not an inability to select it.
- laborcontract 1y agouv solves this problem. uv venv python3.11 done.
- homeless_engi 1y agoConda does! `conda create -n myenv python=3.9`, for example
- krferriter 1y agoconda and uv do manage python versions for you which is part of their appeal, especially on systems that don't make it super straightforward to install multiple different versions of pre-compiled runtimes because their official OS channel of installing python only offers one version. At least on macos, brew supports a number of recent versions that can be installed simultaneously.
- s5ma6n 1y agoI am also using conda and specifically mamba which has a really quick dependency solver. However, sometimes repos require system level packages as well. Tried to run TRELLIS recently and gave up after 2h of tinkering around to get it to work in Windows. Also, whenever I try to run some new repo locally, creating a new virtual environment takes a ton of disk space due to CUDA and PyTorch libraries. It adds up quickly to 100s of gigs since most projects use different versions of these libraries. </rant> Sorry for the rant, can't help myself when it's Python package management...
- WanderPanda 1y agoSame experience. They should really store these blobs centrally under a hash and link to them from the venvs
- turnsout 1y agoAnd this works about 25% of the time. The rest of the time, there is some inscrutable error with the version number of a dependency in requirements.txt or something similar, which you end up Googling, only to find an open issue on a different project's Github repo. Someone needs to make an LLM agent that just handles Python dependency hell.
- mckeed 1y agoAs someone who doesn't develop in python but occasionally tries to run python projects, it's pretty annoying to have to look up how to use venv every time. I finally added two scripts to my path for `python` and `pip` that automatically create and activate a virtual env at `./.venv` if there isn't one active already. It would be nice if something like that was just built into pip so there could be a single command to run like Ruby has now with Bundler.
- krferriter 1y ago`uv` is great for this because its super fast, works well as a globally installed tool (similar to conda), and can also download and manage multiple versions of python for you, and which version is used by which virtualenvironment.
- Grimblewald 1y agoWhile my uv use is still early days, i would second this recommendation. I've found it to have the functionallity i miss from conda in venv, but faster and more reliable than conda.
- atoav 1y agouv is the way. https://docs.astral.sh/uv/ https://docs.astral.sh/uv/ Sadly it appears that people in the LLM space aren't really all that good at packaging their software (maybe, on purpose).
- diggan 1y ago> Sadly it appears that people in the LLM space This seems to be somewhat of a Python side-effect, same goes for almost any Python projects thrown together by people who hasn't spent 10% of their life fighting dependency management in Python. But agree with uv being the best way. I'm not a "real" Python programmer, similar boat to parent that I just end up running a bunch of Python projects for various ML things, and also create some smaller projects myself. Tried conda, micromamba, uv, and a bunch of stuff in-between, most of them breaks at one point or another, meanwhile uv gives me the two most important things in one neat package: Flexible Python versions depending on project, and easy management of venv's. So for people who haven't given it a try yet, do! It does make using Python a lot easier when it comes to dependencies. These are the commands I tend to use according to my history, maybe it's useful as a sort of quickstart. I started using uv maybe 6 months, and this is a summary of literally everything I've used it for so far. # create new venv in working directory with pip + specific python version uv venv --seed --python=3.10 # activate the venv source .venv/bin/activate # on-the-fly install pip dependencies uv pip install transformers # write currently installed deps to file uv pip freeze > requirements.txt # Later... # install deps from file uv pip install -r requirements.txt # run arbitrary file with venv in path etc uv run my_app.py # install a "tool" (like global CLIs) with a specific python version, and optional dependency version uv tool install --force --python python3.12 aider-chat@latest
- amelius 1y agoFor security maybe you should do all of this inside a sandbox.
- diggan 1y agoI'm assuming most people run untrusted stuff like 3rd party libraries in some sort of isolated environment, unless they're begging to be hacked. Some basic security understanding has to be assumed, otherwise we have a long list to go through :)
- ijustlovemath 1y agoI've had a lot of success using podman with pyenv for python versions, and plain old venv for the actual environment. All of this lives within WSL, but you can still access everything locally with localhost:// If you just want to use windows, pyenv-win exists and works pretty well; just set a local version, then instantiate your venv. uv does certainly feel like the future, but I have no interest in participating in a future VC rugpull.
- marziply 1y agoDon't use Bindows then? The tech industry is largely focused on Unix systems so of course there will be inevitable sharp edges when you work on a garbage system like Bindows...
- zo1 1y agoDo you know how much time I (or any other dev) would spend getting a C#, or C++, or JS/TS, or Java or any language project running that has anything to do with ML up and running on tech and tooling we are kinda unfamiliar with? Yes, pretty much 1-2 hours, and very likely more. Sorry but this sort of criticism is so contrived and low-effort. "Oh I tried compiling a language I don't know, using tooling I never use, using an OS I never use (and I hate too btw), and have no experience in any of it, oh and on a brand-new project that's kinda cutting-edge and doing something experimental with an AI/ML model." I could copy-paste your entire thing, replace Windows with Mac, complain about homebrew that I have no idea how to use, developing an iMac app using SwiftUI in some rando editor (probably VSCode or VI), and it would still be the case. It says 0 about the ecosystem, 0 about the OS, 0 about the tools you use, 0 about you as a developer, and dare I say >0 about the usefulness of the comment.
- TeamDman 1y agoPython dependency management sucks ass. Installing pytorch with cuda enabled while dealing with issues from the pytorch index having a linux-only version of a package causing shit to fail is endlessly frustrating A good ecosystem has lockfiles by default, python does not.
- zamadatix 1y agoFor development is one thing, the problem is with this being how the LLM app distribution for general use works too.
- mrinterweb 1y agoMeta comment about this thread: there is a lot of just use "x", use "y", use "z", use ... comments. Kind of proves the point of the top level comment. I feel the same way when installing some python library. There's a bunch of ways to manage dependencies that I wish was more standardized.
- reginald78 1y agoI spin up a whole linux VM with a passed through nvidia GPU for these and I still spend the majority of the time fighting the python and figuring out the missing steps in the setup instructions. Glad for this thread though since it looks like there's some tricks I haven't tried, plus since it seems a lot of other people have similar issues I feel less dumb.
- pokechamp 1y ago[flagged]
- whatevaa 1y agoPython packages and Windows don't mix well
- ericmcer 1y agoit isn't that hard, but also fiddling with python versions is something I don't mind sinking 2 hours into at work but can't tolerate doing for 10 minutes with my free time.
- bobbylarrybobby 1y agoUV is the one final solution to Python problems. Install globally, then you're good to go.
- koljab 1y agoYes, you're absolutely right. I'll provide UV and conda support soon, especially for Windows. I'm using python 3.10 still, maybe that's the issue. You can always mail me your current problem or log an issue, I really care about opening up the repo for as many ppl to use as possible.