InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Fails to run on macOS after running source installer

Open inktomi opened this issue 2 years ago • 18 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

macOS

GPU

cpu

VRAM

No response

What happened?

After downloading the latest macOS source package, I ran ./install.sh and chose "all" for the models to install. It completed and told me:

** Model Installation Successful **
You're all set! You may now launch InvokeAI using one of these two commands:
Web version: 
    python scripts/invoke.py --web  (connect to http://localhost:9090)
Command-line version:
   python scripts/invoke.py

If you installed manually, remember to activate the 'invokeai'
environment before running invoke.py. If you installed using the
automated installation script, execute "invoke.sh" (Linux/Mac) or
"invoke.bat" (Windows) to start InvokeAI.

Have fun!

You can now start generating images by running invoke.sh (inside this folder), using ./invoke.sh

If, however, I run ./invoke.sh I get the following:

❯ ./invoke.sh
WARNING: overwriting environment variables set in the machine
overwriting variable {'PYTORCH_ENABLE_MPS_FALLBACK'}
/Users/.../Downloads/invokeAI/invoke.sh: line 14: syntax error near unexpected token `then'
/Users/.../Downloads/invokeAI/invoke.sh: line 14: `if [ "$(uname -s)" == "Darwin" ]; then'

If I follow the other directions and run using python, I get a different error:

❯ python scripts/invoke.py --web
Traceback (most recent call last):
  File "/Users/inktomi/Downloads/invokeAI/scripts/invoke.py", line 3, in <module>
    import ldm.invoke.CLI
ModuleNotFoundError: No module named 'ldm'

Screenshots

No response

Additional context

No response

Contact Details

No response

inktomi avatar Dec 03 '22 07:12 inktomi

this code has been tested mostly on zsh - are you running a different shell?

damian0815 avatar Dec 03 '22 08:12 damian0815

I’m using the fish shell. I will try zsh. On Dec 3, 2022, at 9:42 AM, Damian Stewart @.***> wrote: this code has been tested mostly on zsh - are you running a different shell?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

inktomi avatar Dec 03 '22 11:12 inktomi

Under zsh the same thing happens for me.

inktomi avatar Dec 03 '22 19:12 inktomi

I figured it out - the if that is complained about is slightly indented for some reason. Removing those indents lets the script run.

inktomi avatar Dec 03 '22 20:12 inktomi

i think there's a bug fix for this already merged into main - please close if it resolves your problem.

damian0815 avatar Dec 03 '22 22:12 damian0815

@damian0815 negative, same here on mac with zsh. It worked before with the pre release but broke now

appinteractive avatar Dec 04 '22 13:12 appinteractive

for me the issue seems to appear when I move the install dir after installation. Is there a way to get it working again after moving?

appinteractive avatar Dec 04 '22 14:12 appinteractive

i think you can cd into the InvokeAI source root dir and run pip install -e . and that should update the paths.

damian0815 avatar Dec 04 '22 15:12 damian0815

or perhaps just pip install . ?

damian0815 avatar Dec 04 '22 15:12 damian0815

I will try, thanks for the hint. For now I leave the installation in the cache folder.

appinteractive avatar Dec 05 '22 08:12 appinteractive

when I try pip install -e . I get this: <path...>/InvokeAI/source_installer/source_installer does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

when I try pip install . I get ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

any other suggestions I can try?

happyplacetraveler avatar Dec 07 '22 21:12 happyplacetraveler

so I went to the containing folder listed above and tried both pip install -e. and pip install . and I got ERROR: Ignored the following versions that require a different python version: 0.55.2 Requires-Python <3.5 ERROR: Could not find a version that satisfies the requirement clipseg (from invokeai) (from versions: none) ERROR: No matching distribution found for clipseg I reinstalled Python and still receive that error.

happyplacetraveler avatar Dec 07 '22 21:12 happyplacetraveler

@happyplacetraveler What OS/version? What does python --version say?

appinteractive avatar Dec 08 '22 06:12 appinteractive

I had big trouble with installing in the wrong folders. Mac does somehow restrict stuff in system folders for example. On windows I heard you need to enable long paths in the regestry for a similar matter.

appinteractive avatar Dec 08 '22 06:12 appinteractive

when I try pip install -e . I get this: <path...>/InvokeAI/source_installer/source_installer does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

when I try pip install . I get ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

any other suggestions I can try?

can you try doing this in the parent directory of source_installer? ie

cd <path...>/InvokeAI
pip install .

damian0815 avatar Dec 08 '22 22:12 damian0815

I get this error:

RROR: Ignored the following versions that require a different python version: 0.55.2 Requires-Python <3.5 ERROR: Could not find a version that satisfies the requirement clipseg (from invokeai) (from versions: none) ERROR: No matching distribution found for clipseg

Mac OS 13.1 python3.10

Any suggestions? On Dec 8, 2022 at 4:40 PM -0600, Damian Stewart @.***>, wrote:

when I try pip install -e . I get this: <path...>/InvokeAI/source_installer/source_installer does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found. when I try pip install . I get ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found. any other suggestions I can try? can you try doing this in the parent directory of source_installer? ie cd <path...>/InvokeAI pip install . — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

happyplacetraveler avatar Dec 10 '22 04:12 happyplacetraveler

Thanks for you reply..

python --version zsh: command not found: python

python3 --version Python 3.10.8

Looking forward to your reply. Thanks again.

On Dec 8, 2022 at 12:44 AM -0600, Grzegorz Leoniec @.***>, wrote:

@happyplacetraveler What OS/version? What does python --version say? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

happyplacetraveler avatar Dec 10 '22 04:12 happyplacetraveler

I manually installed Clipseg, trashed and reinstalled Invoke from scratch, and moved my models out to a different drive. I’ not sure which one did it but it is working great now.

Quick question - is there an easy way to point the Invoke ai to go look in a specific location for models or to add new models AFTER the install has been completed?

Thanks again! On Dec 8, 2022 at 4:40 PM -0600, Damian Stewart @.***>, wrote:

when I try pip install -e . I get this: <path...>/InvokeAI/source_installer/source_installer does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found. when I try pip install . I get ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found. any other suggestions I can try? can you try doing this in the parent directory of source_installer? ie cd <path...>/InvokeAI pip install . — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

happyplacetraveler avatar Dec 10 '22 10:12 happyplacetraveler