InvokeAI
InvokeAI copied to clipboard
[bug]: 1-click installer issue on M1 Mac, 2.1.3
Is there an existing issue for this?
- [x] I have searched the existing issues
OS
macOS
GPU
mps
VRAM
32GB
What happened?
Trying the new 1-click:
building 'greenlet._greenlet' extension creating build/temp.macosx-11.0-arm64-cpython-310 creating build/temp.macosx-11.0-arm64-cpython-310/src creating build/temp.macosx-11.0-arm64-cpython-310/src/greenlet clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -mmacosx-version-min=11.0 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -fPIC -I/var/folders/c8/z52g4gc5679gygt8z0dx0jqm0000gn/T/tmp1kfkgxcf/tools/deps/include -I/var/folders/c8/z52g4gc5679gygt8z0dx0jqm0000gn/T/tmp1kfkgxcf/tools/deps/include/ncursesw -I/var/folders/c8/z52g4gc5679gygt8z0dx0jqm0000gn/T/tmp1kfkgxcf/tools/deps/include/uuid -Werror=unguarded-availability-new -I/Users/joe/InvokeAI/.venv/include -I/install/include/python3.10 -c src/greenlet/greenlet.cpp -o build/temp.macosx-11.0-arm64-cpython-310/src/greenlet/greenlet.o --std=gnu++11 src/greenlet/greenlet.cpp:16:10: fatal error: 'Python.h' file not found #include <Python.h> ^~~~~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure
× Encountered error while trying to install package. ╰─> greenlet
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
Ran the .sh install script again, and it errored out here:
File "/private/var/folders/tx/1l8r6cbn59ndy1_zfqgkc0j40000gn/T/pip-install-jo7llt69/grpcio_0d24565d438748e6abf32c125bc246aa/src/python/grpcio/support.py", line 68, in _expect_compile raise commands.CommandError( commands.CommandError: Diagnostics found a compilation environment issue:
Could not find <Python.h>. This could mean the following:
* You're on Ubuntu and haven't run `apt-get install python3-dev`.
* You're on RHEL/Fedora and haven't run `yum install python3-devel` or
`dnf install python3-devel` (make sure you also have redhat-rpm-config
installed)
* You're on Mac OS X and the usual Python framework was somehow corrupted
(check your environment variables or try re-installing?)
* You're on Windows and your Python installation was somehow corrupted
(check your environment variables or try re-installing?)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure
× Encountered error while trying to install package. ╰─> grpcio
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
I'm having a similar issue as well
Same here.
I am getting this problem as well. I think it has something to do with multiple Python installations. I will update if I fix
There is an open pull request to address this problem - https://github.com/invoke-ai/InvokeAI/pull/1488
I tried to test the fix in the pull request, but the install script is overwriting itself from the main branch on github before it runs, so I can't get it to run the modified copy...
Wow, that was the weirdest hack I've done in a long time, but I got the modified installer script to run. Here's what I did:
First, I replaced lines 76 and 77 in installer/install.sh with the following:
RELEASE_URL=https://github.com/damian0815/InvokeAI/ RELEASE_SOURCEBALL=/archive/refs/heads/fix_macos_installer.tar.gz
Then the script was failing because it was jumping to a different place when the script overwrote itself with a different version. Btw, this is a HUGE problem, because it means that if that script legitimately gets updated in the repo, it's going to break itself.
Anyway, I was able to fix this problem by getting the difference in the character counts between the original and updated version of those two lines. I deleted that number of characters (17) from the comment on line 89, which allowed the script to pick up in the correct place after overwriting itself and continue executing.
I'm finally able to run InvokeAI again, but it looks like GFPGAN and CodeFormer and both broken, and the whole thing crashes unless I completely disable face restoration. Sigh. Maybe now I will finally learn my lesson and stop trying to update InvokeAI without making a backup of my working installation...
@whosawhatsis to be clear, you need to run create_installers.sh which will produce a InvokeAI-mac.zip file. copy this out to an empty folder outside of the InvokeAI tree and run it from there. should be no need to edit anything. once the pull request is finalized of course you'll be able to just download the zip file.
if that still doesn't work, please add a comment to the pull reqeust
Yes, that process works much better. Face restoration is still broken, though. Off to post another issue...
I have done some work on the GFPGAN fork. If you don't mind, could you try one of the manual installation methods again?
Which branch?
I just tried the install using invokeAI-src-installer-mac.zip, and everything seems to be working.
same issue here
I have the same issue
same issue here, copy install.sh, run it, fail.
Could it be an issue with pyenv?
@appinteractive I think not, because I had it uninstalled completely before running the script. I'm getting "fatal error: 'Python.h' file not found" while building 'greenlet._greenlet' extension.
The subprocess fails with the message "Running setup.py install for greenlet did not run successfully."
This is a known issue, there is a fix coming very soon with the v2.2 release. Sorry for the troubles and thanks for your patience.
I think for me it was because of a wrong python version (3.7 instead of 3.10) with pyenv. So did I uninstall all pip packages from requirements.txt before trying to reinstall again.
This is a known issue, there is a fix coming very soon with the v2.2 release. Sorry for the troubles and thanks for your patience.
Is there a workaround in the meantime?
This is a known issue, there is a fix coming very soon with the v2.2 release. Sorry for the troubles and thanks for your patience.
waiting for new release))