diff --git a/docs/installation/010_INSTALL_AUTOMATED.md b/docs/installation/010_INSTALL_AUTOMATED.md index 0937c07bca..52192f33c0 100644 --- a/docs/installation/010_INSTALL_AUTOMATED.md +++ b/docs/installation/010_INSTALL_AUTOMATED.md @@ -40,7 +40,7 @@ experimental versions later. this, open up a command-line window ("Terminal" on Linux and Macintosh, "Command" or "Powershell" on Windows) and type `python --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. !!! 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/) and download the appropriate installer package for your 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. _Please select your platform in the section below for platform-specific diff --git a/docs/installation/020_INSTALL_MANUAL.md b/docs/installation/020_INSTALL_MANUAL.md index a19992d266..27484c0ffd 100644 --- a/docs/installation/020_INSTALL_MANUAL.md +++ b/docs/installation/020_INSTALL_MANUAL.md @@ -32,7 +32,7 @@ gaming): * **Python** - version 3.9 through 3.11 + version 3.10 through 3.11 * **CUDA Tools** @@ -65,7 +65,7 @@ gaming): To install InvokeAI with virtual environments and the PIP package 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: ```bash diff --git a/docs/installation/060_INSTALL_PATCHMATCH.md b/docs/installation/060_INSTALL_PATCHMATCH.md index ccfd19d207..a9646f8b60 100644 --- a/docs/installation/060_INSTALL_PATCHMATCH.md +++ b/docs/installation/060_INSTALL_PATCHMATCH.md @@ -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: ```py - Python 3.9.5 (default, Nov 23 2021, 15:27:38) - [GCC 9.3.0] on linux + Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from patchmatch import patch_match Compiling and loading c extensions from "/home/lstein/Projects/InvokeAI/.invokeai-env/src/pypatchmatch/patchmatch". diff --git a/installer/install.bat.in b/installer/install.bat.in index ffe96d4355..5fa76471de 100644 --- a/installer/install.bat.in +++ b/installer/install.bat.in @@ -1,7 +1,7 @@ @echo off 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 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 TROUBLESHOOTING=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting 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 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. 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 not supported at the moment. +echo 1. Install python 3.10 or 3.11. Python version 3.9 is no longer supported. echo 2. Double-click on the file WinLongPathsEnabled.reg in order to echo enable long path support on your system. echo 3. Install the Visual C++ core libraries. @@ -46,19 +45,19 @@ echo ***** Checking and Updating Python ***** call python --version >.tmp1 2>.tmp2 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 ) for /f "tokens=2" %%i in (.tmp1) do set python_version=%%i 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 ) call :compareVersions %MINIMUM_PYTHON_VERSION% %python_version% 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 ) diff --git a/installer/install.sh.in b/installer/install.sh.in index 1b8ba92ea6..9cf41192bf 100755 --- a/installer/install.sh.in +++ b/installer/install.sh.in @@ -8,10 +8,10 @@ cd $scriptdir 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 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 # 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 diff --git a/installer/lib/installer.py b/installer/lib/installer.py index 70ed4d4331..bf48e3b06d 100644 --- a/installer/lib/installer.py +++ b/installer/lib/installer.py @@ -13,7 +13,7 @@ from pathlib import Path from tempfile import TemporaryDirectory 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"] BOOTSTRAP_VENV_PREFIX = "invokeai-installer-tmp" @@ -67,7 +67,6 @@ class Installer: # Cleaning up temporary directories on Windows results in a race condition # and a stack trace. # `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: venv_dir = TemporaryDirectory(prefix=BOOTSTRAP_VENV_PREFIX, ignore_cleanup_errors=True) else: @@ -139,13 +138,6 @@ class Installer: except shutil.SameFileError: 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 def install( diff --git a/installer/readme.txt b/installer/readme.txt index b9a97e2093..ef040c3913 100644 --- a/installer/readme.txt +++ b/installer/readme.txt @@ -4,7 +4,7 @@ Project homepage: https://github.com/invoke-ai/InvokeAI 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: https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/ @@ -14,15 +14,15 @@ Preparations: python --version 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: pip --version You should get a message that indicates that the pip package - installer was derived from Python 3.9 or 3.10. For example: - "pip 22.3.1 from /usr/bin/pip (python 3.9)" + installer was derived from Python 3.10 or 3.11. For example: + "pip 22.0.1 from /usr/bin/pip (python 3.10)" Long Paths on Windows: diff --git a/pyproject.toml b/pyproject.toml index 03fc45c5dc..67486e1120 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "InvokeAI" 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" } keywords = ["stable-diffusion", "AI"] dynamic = ["version"]