update requirements to python 3.10-11

This commit is contained in:
Lincoln Stein 2023-09-28 09:28:41 -04:00 committed by psychedelicious
parent c69715636d
commit 9542883bb5
8 changed files with 19 additions and 29 deletions

View File

@ -40,7 +40,7 @@ experimental versions later.
this, open up a command-line window ("Terminal" on Linux and this, open up a command-line window ("Terminal" on Linux and
Macintosh, "Command" or "Powershell" on Windows) and type `python Macintosh, "Command" or "Powershell" on Windows) and type `python
--version`. If Python is installed, it will print out the version --version`. If Python is installed, it will print out the version
number. If it is version `3.9.*`, `3.10.*` or `3.11.*` you meet number. If it is version `3.10.*` or `3.11.*` you meet
requirements. requirements.
!!! warning "What to do if you have an unsupported version" !!! warning "What to do if you have an unsupported version"
@ -48,7 +48,7 @@ experimental versions later.
Go to [Python Downloads](https://www.python.org/downloads/) Go to [Python Downloads](https://www.python.org/downloads/)
and download the appropriate installer package for your and download the appropriate installer package for your
platform. We recommend [Version platform. We recommend [Version
3.10.9](https://www.python.org/downloads/release/python-3109/), 3.10.12](https://www.python.org/downloads/release/python-3109/),
which has been extensively tested with InvokeAI. which has been extensively tested with InvokeAI.
_Please select your platform in the section below for platform-specific _Please select your platform in the section below for platform-specific

View File

@ -32,7 +32,7 @@ gaming):
* **Python** * **Python**
version 3.9 through 3.11 version 3.10 through 3.11
* **CUDA Tools** * **CUDA Tools**
@ -65,7 +65,7 @@ gaming):
To install InvokeAI with virtual environments and the PIP package To install InvokeAI with virtual environments and the PIP package
manager, please follow these steps: manager, please follow these steps:
1. Please make sure you are using Python 3.9 through 3.11. The rest of the install 1. Please make sure you are using Python 3.10 through 3.11. The rest of the install
procedure depends on this and will not work with other versions: procedure depends on this and will not work with other versions:
```bash ```bash

View File

@ -59,8 +59,7 @@ Prior to installing PyPatchMatch, you need to take the following steps:
`from patchmatch import patch_match`: It should look like the following: `from patchmatch import patch_match`: It should look like the following:
```py ```py
Python 3.9.5 (default, Nov 23 2021, 15:27:38) Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information. Type "help", "copyright", "credits" or "license" for more information.
>>> from patchmatch import patch_match >>> from patchmatch import patch_match
Compiling and loading c extensions from "/home/lstein/Projects/InvokeAI/.invokeai-env/src/pypatchmatch/patchmatch". Compiling and loading c extensions from "/home/lstein/Projects/InvokeAI/.invokeai-env/src/pypatchmatch/patchmatch".

View File

@ -1,7 +1,7 @@
@echo off @echo off
setlocal EnableExtensions EnableDelayedExpansion setlocal EnableExtensions EnableDelayedExpansion
@rem This script requires the user to install Python 3.9 or higher. All other @rem This script requires the user to install Python 3.10 or higher. All other
@rem requirements are downloaded as needed. @rem requirements are downloaded as needed.
@rem change to the script's directory @rem change to the script's directory
@ -19,7 +19,7 @@ set INVOKEAI_VERSION=latest
set INSTRUCTIONS=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/ set INSTRUCTIONS=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/
set TROUBLESHOOTING=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting set TROUBLESHOOTING=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting
set PYTHON_URL=https://www.python.org/downloads/windows/ set PYTHON_URL=https://www.python.org/downloads/windows/
set MINIMUM_PYTHON_VERSION=3.9.0 set MINIMUM_PYTHON_VERSION=3.10.0
set PYTHON_URL=https://www.python.org/downloads/release/python-3109/ set PYTHON_URL=https://www.python.org/downloads/release/python-3109/
set err_msg=An error has occurred and the script could not continue. set err_msg=An error has occurred and the script could not continue.
@ -28,8 +28,7 @@ set err_msg=An error has occurred and the script could not continue.
echo This script will install InvokeAI and its dependencies. echo This script will install InvokeAI and its dependencies.
echo. echo.
echo BEFORE YOU START PLEASE MAKE SURE TO DO THE FOLLOWING echo BEFORE YOU START PLEASE MAKE SURE TO DO THE FOLLOWING
echo 1. Install python 3.9 or 3.10. Python version 3.11 and above are echo 1. Install python 3.10 or 3.11. Python version 3.9 is no longer supported.
echo not supported at the moment.
echo 2. Double-click on the file WinLongPathsEnabled.reg in order to echo 2. Double-click on the file WinLongPathsEnabled.reg in order to
echo enable long path support on your system. echo enable long path support on your system.
echo 3. Install the Visual C++ core libraries. echo 3. Install the Visual C++ core libraries.
@ -46,19 +45,19 @@ echo ***** Checking and Updating Python *****
call python --version >.tmp1 2>.tmp2 call python --version >.tmp1 2>.tmp2
if %errorlevel% == 1 ( if %errorlevel% == 1 (
set err_msg=Please install Python 3.10. See %INSTRUCTIONS% for details. set err_msg=Please install Python 3.10-11. See %INSTRUCTIONS% for details.
goto err_exit goto err_exit
) )
for /f "tokens=2" %%i in (.tmp1) do set python_version=%%i for /f "tokens=2" %%i in (.tmp1) do set python_version=%%i
if "%python_version%" == "" ( if "%python_version%" == "" (
set err_msg=No python was detected on your system. Please install Python version %MINIMUM_PYTHON_VERSION% or higher. We recommend Python 3.10.9 from %PYTHON_URL% set err_msg=No python was detected on your system. Please install Python version %MINIMUM_PYTHON_VERSION% or higher. We recommend Python 3.10.12 from %PYTHON_URL%
goto err_exit goto err_exit
) )
call :compareVersions %MINIMUM_PYTHON_VERSION% %python_version% call :compareVersions %MINIMUM_PYTHON_VERSION% %python_version%
if %errorlevel% == 1 ( if %errorlevel% == 1 (
set err_msg=Your version of Python is too low. You need at least %MINIMUM_PYTHON_VERSION% but you have %python_version%. We recommend Python 3.10.9 from %PYTHON_URL% set err_msg=Your version of Python is too low. You need at least %MINIMUM_PYTHON_VERSION% but you have %python_version%. We recommend Python 3.10.12 from %PYTHON_URL%
goto err_exit goto err_exit
) )

View File

@ -8,10 +8,10 @@ cd $scriptdir
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
MINIMUM_PYTHON_VERSION=3.9.0 MINIMUM_PYTHON_VERSION=3.10.0
MAXIMUM_PYTHON_VERSION=3.11.100 MAXIMUM_PYTHON_VERSION=3.11.100
PYTHON="" PYTHON=""
for candidate in python3.11 python3.10 python3.9 python3 python ; do for candidate in python3.11 python3.10 python3 python ; do
if ppath=`which $candidate`; then if ppath=`which $candidate`; then
# when using `pyenv`, the executable for an inactive Python version will exist but will not be operational # when using `pyenv`, the executable for an inactive Python version will exist but will not be operational
# we check that this found executable can actually run # we check that this found executable can actually run

View File

@ -13,7 +13,7 @@ from pathlib import Path
from tempfile import TemporaryDirectory from tempfile import TemporaryDirectory
from typing import Union from typing import Union
SUPPORTED_PYTHON = ">=3.9.0,<=3.11.100" SUPPORTED_PYTHON = ">=3.10.0,<=3.11.100"
INSTALLER_REQS = ["rich", "semver", "requests", "plumbum", "prompt-toolkit"] INSTALLER_REQS = ["rich", "semver", "requests", "plumbum", "prompt-toolkit"]
BOOTSTRAP_VENV_PREFIX = "invokeai-installer-tmp" BOOTSTRAP_VENV_PREFIX = "invokeai-installer-tmp"
@ -67,7 +67,6 @@ class Installer:
# Cleaning up temporary directories on Windows results in a race condition # Cleaning up temporary directories on Windows results in a race condition
# and a stack trace. # and a stack trace.
# `ignore_cleanup_errors` was only added in Python 3.10 # `ignore_cleanup_errors` was only added in Python 3.10
# users of Python 3.9 will see a gnarly stack trace on installer exit
if OS == "Windows" and int(platform.python_version_tuple()[1]) >= 10: if OS == "Windows" and int(platform.python_version_tuple()[1]) >= 10:
venv_dir = TemporaryDirectory(prefix=BOOTSTRAP_VENV_PREFIX, ignore_cleanup_errors=True) venv_dir = TemporaryDirectory(prefix=BOOTSTRAP_VENV_PREFIX, ignore_cleanup_errors=True)
else: else:
@ -139,13 +138,6 @@ class Installer:
except shutil.SameFileError: except shutil.SameFileError:
venv.create(venv_dir, with_pip=True, symlinks=True) venv.create(venv_dir, with_pip=True, symlinks=True)
# upgrade pip in Python 3.9 environments
if int(platform.python_version_tuple()[1]) == 9:
from plumbum import FG, local
pip = local[get_pip_from_venv(venv_dir)]
pip["install", "--upgrade", "pip"] & FG
return venv_dir return venv_dir
def install( def install(

View File

@ -4,7 +4,7 @@ Project homepage: https://github.com/invoke-ai/InvokeAI
Preparations: Preparations:
You will need to install Python 3.9 or higher for this installer You will need to install Python 3.10 or higher for this installer
to work. Instructions are given here: to work. Instructions are given here:
https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/ https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/
@ -14,15 +14,15 @@ Preparations:
python --version python --version
If all is well, it will print "Python 3.X.X", where the version number If all is well, it will print "Python 3.X.X", where the version number
is at least 3.9.*, and not higher than 3.11.*. is at least 3.10.*, and not higher than 3.11.*.
If this works, check the version of the Python package manager, pip: If this works, check the version of the Python package manager, pip:
pip --version pip --version
You should get a message that indicates that the pip package You should get a message that indicates that the pip package
installer was derived from Python 3.9 or 3.10. For example: installer was derived from Python 3.10 or 3.11. For example:
"pip 22.3.1 from /usr/bin/pip (python 3.9)" "pip 22.0.1 from /usr/bin/pip (python 3.10)"
Long Paths on Windows: Long Paths on Windows:

View File

@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "InvokeAI" name = "InvokeAI"
description = "An implementation of Stable Diffusion which provides various new features and options to aid the image generation process" description = "An implementation of Stable Diffusion which provides various new features and options to aid the image generation process"
requires-python = ">=3.9, <3.12" requires-python = ">=3.10, <3.12"
readme = { content-type = "text/markdown", file = "README.md" } readme = { content-type = "text/markdown", file = "README.md" }
keywords = ["stable-diffusion", "AI"] keywords = ["stable-diffusion", "AI"]
dynamic = ["version"] dynamic = ["version"]