Replies: 1 comment 1 reply
-
If you did the switch after installing, it will be stuck on the old one - the install environment has its own python version that links back to the global install env that was used to create it. Unfortunately, to my knowledge, migrating an env between python versions is annoyingly difficult - the easiest thing to do is just nuke & rebuild. If you have a bit of basic technical experience you can open the comfy folder under python3 -s -m venv venv
. venv/bin/activate
python3 -s -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
python3 -s -m pip install -r requirements.txt Then also install any relevant custom node requirements too If you have a bit more technical experience you can do the ps - the reason for the third party package of dotnet isn't for net8, it's for net 7 -- currently Swarm uses 7 and is transitioning to 8 soon, thus installers trying to preinclude 8 in advance to reduce rate of issues once the changeover is done. Mac's packages just hardswapped to 8 without an easy route to install the old 7, and for some reason dotnet8 doesn't just support net7, so a thirdparty brew package was needed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello☺️
I'm experiencing an issue with Swarm using the wrong version of Python on macOS Sonoma (I have an M1 Max MacBook Pro). It keeps defaulting to Python 3.9 despite my environment being set up for Python 3.10.11 via
pyenv
. Swarm works absolutely fine for me however I am trying to use the ComfyMath nodes, but this leads to the followingImportError
when starting up Swarm related toTypeAlias
, which, I believe (?), is not supported in Python 3.9.12:08:33.534 [Warning] ComfyUI-0 on port 7821 stdout: ImportError: cannot import name 'TypeAlias' from 'typing' (/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py)
I'm not sure why Swarm/ComfyUI is using that version of Python - I believe the folder location suggests it's the command line tools from Xcode(?). Python and .NET aren't my bag, unfortunately, so apologies if my understanding is wrong or I've missed something really obvious. Anyways, here are the steps I've taken up to this point:
pyenv
to manage Python installs and it's currently set to use Python 3.10.11.zshrc
with the recommendedpyenv
initialization commands, and verified the correct version withpython3 --version
launch-macos.sh
script to export thepyenv
Python path before execution, but this did nothing.Despite these efforts, the server output indicates Swarm, dotnet, or maybe a subsystem, is still invoking Python 3.9.
Does anyone know how I can get ComfyMath working or get Swarm to use the Python version setup in
pyenv
? Any insights or suggestions would be greatly appreciated.Thank you!
James
Beta Was this translation helpful? Give feedback.
All reactions