InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Install fails on Windows machine with both Python 3.11 and 3.12 installed

Open xaroth8088 opened this issue 1 year ago • 1 comments

Is there an existing issue for this problem?

  • [X] I have searched the existing issues

Operating system

Windows

GPU vendor

Nvidia (CUDA)

GPU model

No response

GPU VRAM

No response

Version number

4.0.4

Browser

N/A

Python dependencies

No response

What happened

Installation failed due to not finding a 3.12-compatible version of invokeai[onnx-cuda,xformers].

What you expected to happen

One or more of:

  1. Installation fails, notifying me that Python 3.12 is not supported
  2. Installation succeeds using Python 3.12
  3. I am prompted for which Python to use
  4. A flag exists for install.bat that can be used to specify the correct version of Python to use
  5. The install script attempts to use python311.exe instead of python.exe
  6. The install script tries multiple different python versions in the path until it finds a compatible version (e.g. "try python310.exe - not installed? try python311.exe - not installed?, etc.)
  7. your ideas here

How to reproduce the problem

  1. Install Python 3.11
  2. Install Python 3.12
  3. Verify that python --version reflects the 3.12 version
  4. Run install.bat

Additional context

No response

Discord username

No response

xaroth8088 avatar Apr 13 '24 18:04 xaroth8088

Looks like the windows installer doesn't check that the installed python is <3.12.

Maybe we could migrate the script to use powershell when we updated it (much simpler).

As a workaround, you can add the python 11 executable to your PATH. Open a cmd terminal and set PATH for the current terminal session:

set PATH=C:\path\to\python311.exe;%PATH%

Then run the installer from that terminal. The installer will use the current python path when setting up the app, you shouldn't need to set the PATH when you launch the app in the future.

psychedelicious avatar Apr 14 '24 07:04 psychedelicious