InvokeAI: [bug]: Unable to Install InvokeAI 2.3.0 on Windows 10 using Installer

Is there an existing issue for this?

  • I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

12GB

What happened?

This may be similar to another issue, https://github.com/invoke-ai/InvokeAI/issues/2612 , but it appears to be a different error.

I have tried updating my previous 2.5 installation and doing a fresh installation with both failing when installing Pytorch with the following error:

──────────────────────────────────────────────── Installing PyTorch 🔥 ──────────────────────────────────────────────── Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu117 ERROR: Could not find a version that satisfies the requirement torch (from versions: none) ERROR: No matching distribution found for torch Traceback (most recent call last): File “C:\Console\InvokeAI\InvokeAI-Installer\lib\main.py”, line 50, in <module> inst.install(**args.dict) File “C:\Console\InvokeAI\InvokeAI-Installer\lib\installer.py”, line 179, in install self.instance.install( File “C:\Console\InvokeAI\InvokeAI-Installer\lib\installer.py”, line 232, in install self.install_torch(extra_index_url, find_links) File “C:\Console\InvokeAI\InvokeAI-Installer\lib\installer.py”, line 247, in install_torch pip[ File “C:\Users\user\AppData\Local\Temp\invokeai-installer-tmp0olxkqlt\Lib\site-packages\plumbum\commands\modifiers.py”, line 145, in rand cmd( File “C:\Users\user\AppData\Local\Temp\invokeai-installer-tmp0olxkqlt\Lib\site-packages\plumbum\commands\base.py”, line 113, in call return self.run(args, **kwargs)[1] ^^^^^^^^^^^^^^^^^^^^^^^^ File “C:\Users\user\AppData\Local\Temp\invokeai-installer-tmp0olxkqlt\Lib\site-packages\plumbum\commands\base.py”, line 252, in run return p.run() ^^^^^^^ File “C:\Users\user\AppData\Local\Temp\invokeai-installer-tmp0olxkqlt\Lib\site-packages\plumbum\commands\base.py”, line 215, in runner return run_proc(p, retcode, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “C:\Users\user\AppData\Local\Temp\invokeai-installer-tmp0olxkqlt\Lib\site-packages\plumbum\commands\processes.py”, line 304, in run_proc return _check_process(proc, retcode, timeout, stdout, stderr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “C:\Users\user\AppData\Local\Temp\invokeai-installer-tmp0olxkqlt\Lib\site-packages\plumbum\commands\processes.py”, line 17, in _check_process proc.verify(retcode, timeout, stdout, stderr) File “C:\Users\user\AppData\Local\Temp\invokeai-installer-tmp0olxkqlt\Lib\site-packages\plumbum\machines\base.py”, line 27, in verify raise ProcessExecutionError( plumbum.commands.processes.ProcessExecutionError: Unexpected exit code: 1 Command line: | ‘C:\Console\InvokeAI.venv\Scripts\pip.exe’ install --require-virtualenv torch torchvision --force-reinstall --extra-index-url https://download.pytorch.org/whl/cu117 = was unexpected at this time.

I then tried updating my existing installation with pip install invokeai.

All requirements were successfully installed, but it failed to run with invoke.bat with the error Original error was: No module named 'numpy.core._multiarray_umath'. I was able to fix this by updating numpy from 1.23.5 to 1.24.2.

Next attempt it failed importing Pillow: ImportError: cannot import name '_imaging' from 'PIL' (C:\Console\InvokeAI\.venv\Lib\site-packages\PIL\__init__.py). I was able to resolve that by uninstalling and reinstalling Pillow 9.4.0.

Finally, it failed on PyTorch again and I could find a way to progress further. I tried reinstalling PyTorch manually, but it did not help.

ImportError: Failed to load PyTorch C extensions:
    It appears that PyTorch has loaded the `torch/_C` folder
    of the PyTorch repository rather than the C extensions which
    are expected in the `torch._C` namespace. This can occur when
    using the `install` workflow. e.g.
        $ python setup.py install && python -c "import torch"

    This error can generally be solved using the `develop` workflow
        $ python setup.py develop && python -c "import torch"  # This should succeed
    or by running Python from a different directory.

Screenshots

No response

Additional context

No response

Contact Details

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 24 (5 by maintainers)

Most upvoted comments

It looks like we have the same issue. If you don’t use Python 3.11 for a specific purpose, you could try downgrading to Python 3.10 or maybe adjusting your system environment variables so Python 3.10 is the default version of Python.

Otherwise, you could try a manual installation. What worked for me was opening a command prompt and browsing to the folder I wanted to install InvokeAI. Then running the following commands one line at a time:

python pip install virtualenv
virtualenv .venv --python=python3.10
call .venv/Scripts/activate.bat
python --version
pip install invokeai
invokeai-configure
invokeai --web

You can find more info about this method in this part of the documentation: https://invoke-ai.github.io/InvokeAI/installation/020_INSTALL_MANUAL/

Thanks, that worked! I tried before but then the command window just disappeared, maybe I didn’t use “call activate”, I just had “activate” there. Thank you, now I’m all set 😃