InvokeAI
InvokeAI copied to clipboard
[bug]: Install fails on Windows machine with both Python 3.11 and 3.12 installed
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:
- Installation fails, notifying me that Python 3.12 is not supported
- Installation succeeds using Python 3.12
- I am prompted for which Python to use
- A flag exists for install.bat that can be used to specify the correct version of Python to use
- The install script attempts to use
python311.exeinstead ofpython.exe - The install script tries multiple different python versions in the path until it finds a compatible version (e.g. "try
python310.exe- not installed? trypython311.exe- not installed?, etc.) - your ideas here
How to reproduce the problem
- Install Python 3.11
- Install Python 3.12
- Verify that
python --versionreflects the 3.12 version - Run install.bat
Additional context
No response
Discord username
No response
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.