feature: make install easier for unixers with asdf#170
feature: make install easier for unixers with asdf#170airtonix wants to merge 2 commits intoComfy-Org:masterfrom airtonix:feat/asdf-support
Conversation
|
I'm sorry but I'm not familiar with asdf. I have always used system python on linux (with pip packages installed as user and the occasional venv). Is there any problem with doing it that way? |
|
@comfyanonymous Yeah there is, but it's not always obvious at first. Most linux desktop operating systems rely on python for their desktop environments, much like how Macos relies on Ruby for some OS operations. Here's a range of problems I've experienced over the last ten'ish years: before you discover virtual env
So you learn about virtualenvs: the obvious problems go away. But now you're working on projects that need to work for many years. You think you're a smart cookie by pinning your packages, but you assumed that these particular versions of those apackages would work with any version of python 3.x. imagine your surprise and / or frustration when:
Another annoying problem when you only rely on
In most projects, people use Docker to solve this problem. Which is fine for systems that horizontally scale the workload. And when used properly Docker basically eliminates your dependancies as issues once you QA it properly.... they're set in stone. ASDF lets you pin the versions of all kinds of tools/engines without having to deal with the overhead of docker (or even worse: virtual machines): There is no more:
final note: Look at how the more bullet proof docker images setup nodejs or ; they rarely do it by installing the language engine from the os repos. |
|
After just dealing with this nightmare again and stumbling upon this thread as I try to figure out how to resolve my issues, I'd just like to throw my hat into this discussion. I think this is especially relevant for Mac users because of Homebrew's unreliable Python build. I get errors out the wazoo even when I've installed pipenv and use the venv. as there, as my error logs call it, a "leak" wherein custom nodes are trying to import something like "shutil.py." When it is executed, (I suppose Cpython doesn't have shutil.py?) it is relayed back to my Homebrew Python build and causes
However, I'd suggest what is essentially "Rust ASDF" or "ASDF 2.0", rtx. It not only acts as a package-man-to-rule-them-all but it is extremely speedy and has a phenomenal error log that is actually readable and thus actionable thanks to Rust. More error log snippet fun |
This PR adds a tool version manifest for asdf and a quick bootstrap bash file that will setup asdf on your system (linux and mac users only)
For Linux, don't recommend using system python, it just leads to destroyed desktop environments as people inevitably try to install conflicting packages that can't be put in an venv.
asdf will install python the same way regardless of linux/mac os version/family (so only one setup instructions required)