InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

Problem in Install [bug]:

Open ogresan opened this issue 3 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

No response

What happened?

During install I get the following error (Latest Python and Pytorch installed):

Collecting torch-fidelity Using cached torch_fidelity-0.3.0-py3-none-any.whl (37 kB) Collecting torchmetrics Using cached torchmetrics-0.11.0-py3-none-any.whl (512 kB) Collecting transformers==4.25.* Using cached transformers-4.25.1-py3-none-any.whl (5.8 MB) ERROR: Ignored the following versions that require a different python version: 0.55.2 Requires-Python <3.5; 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11 ERROR: Could not find a version that satisfies the requirement torch==1.12.1 (from versions: none) ERROR: No matching distribution found for torch==1.12.1 Installation of requirements failed. See above for errors and check https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for potential solutions.

Screenshots

No response

Additional context

I've tried uninstalling and reinstalling pytorch and torchvision, no change.

Contact Details

[email protected]

ogresan avatar Dec 12 '22 01:12 ogresan

I'm sorry you're seeing this problem. Could you try the following tests for me and post your results?

  1. Using the windows power shell, enter the invokeai directory that the install script created. It is usually in \Users\your_name\invokeai
  2. Post the contents of the file requirements.txt
  3. Run the command python -V and post the result.
  4. Run the command .venv\Scripts\activate.bat (your prompt should change to include the word .venv. Let me know if it doesn't)
  5. Run the command python -V again and post the result (I'm worried about different versions of Python being installed in different places)
  6. Run the command pip install --no-cache -r requirements.txt

(6) should run to completion without any errors about the torch version. If it doesn't, then the information you provided will help sorting out the issue.

lstein avatar Dec 12 '22 13:12 lstein

Thanks for getting back to me. Here's what I got:

requirements.txt:

-r environments-and-requirements/requirements-base.txt

Get hardware-appropriate torch/torchvision

--extra-index-url https://download.pytorch.org/whl/cu116 --trusted-host https://download.pytorch.org torch==1.12.1 torchvision==0.13.1

PS C:\Users\User\invokeai> python -v import _frozen_importlib # frozen import _imp # builtin import '_thread' # <class '_frozen_importlib.BuiltinImporter'> import '_warnings' # <class '_frozen_importlib.BuiltinImporter'> import '_weakref' # <class '_frozen_importlib.BuiltinImporter'> import 'winreg' # <class '_frozen_importlib.BuiltinImporter'> import '_io' # <class '_frozen_importlib.BuiltinImporter'> import 'marshal' # <class '_frozen_importlib.BuiltinImporter'> import 'nt' # <class '_frozen_importlib.BuiltinImporter'> import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>

installing zipimport hook

import 'time' # <class '_frozen_importlib.BuiltinImporter'> import 'zipimport' # <class '_frozen_importlib.FrozenImporter'>

installed zipimport hook

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings_pycache__init_.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings_init_.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings\pycache\init.cpython-311.pyc'

import '_codecs' # <class '_frozen_importlib.BuiltinImporter'> import 'codecs' # <class '_frozen_importlib.FrozenImporter'>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings_pycache_\aliases.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings\aliases.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings\pycache\aliases.cpython-311.pyc'

import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA59A1990> import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5997350>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings_pycache_\utf_8.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings\utf_8.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings\pycache\utf_8.cpython-311.pyc'

import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA59C1610>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings_pycache_\cp1252.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings\pycache\cp1252.cpython-311.pyc'

import 'encodings.cp1252' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA59C1BD0> import '_signal' # <class '_frozen_importlib.BuiltinImporter'> import '_abc' # <class '_frozen_importlib.BuiltinImporter'> import 'abc' # <class '_frozen_importlib.FrozenImporter'> import 'io' # <class '_frozen_importlib.FrozenImporter'> import '_stat' # <class '_frozen_importlib.BuiltinImporter'> import 'stat' # <class '_frozen_importlib.FrozenImporter'> import '_collections_abc' # <class '_frozen_importlib.FrozenImporter'> import 'genericpath' # <class '_frozen_importlib.FrozenImporter'> import '_winapi' # <class '_frozen_importlib.BuiltinImporter'> import 'ntpath' # <class '_frozen_importlib.FrozenImporter'> import 'os' # <class '_frozen_importlib.FrozenImporter'> import '_sitebuiltins' # <class '_frozen_importlib.FrozenImporter'> Processing user site-packages Processing global site-packages Adding directory: 'C:\Users\User\AppData\Local\Programs\Python\Python311' Adding directory: 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages' Processing .pth file: 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\distutils-precedence.pth'

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages_distutils_hack_pycache__init_.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages_distutils_hack_init_.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\_distutils_hack\pycache\init.cpython-311.pyc'

import '_distutils_hack' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5B5C550> import 'site' # <class '_frozen_importlib.FrozenImporter'>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\rlcompleter.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\rlcompleter.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\rlcompleter.cpython-311.pyc'

import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\inspect.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\inspect.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\inspect.cpython-311.pyc'

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\ast.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\ast.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\ast.cpython-311.pyc'

import '_ast' # <class '_frozen_importlib.BuiltinImporter'>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\contextlib.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\contextlib.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\contextlib.cpython-311.pyc'

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\collections_pycache__init_.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\collections_init_.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\collections\pycache\init.cpython-311.pyc'

import 'itertools' # <class '_frozen_importlib.BuiltinImporter'>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\keyword.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\keyword.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\keyword.cpython-311.pyc'

import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5BEE790>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\operator.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\operator.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\operator.cpython-311.pyc'

import '_operator' # <class '_frozen_importlib.BuiltinImporter'> import 'operator' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5BEECD0>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\reprlib.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\reprlib.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\reprlib.cpython-311.pyc'

import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5BEF910> import '_collections' # <class '_frozen_importlib.BuiltinImporter'> import 'collections' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5BC6190>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\functools.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\functools.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\functools.cpython-311.pyc'

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\types.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\types.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\types.cpython-311.pyc'

import 'types' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5C13190> import '_functools' # <class '_frozen_importlib.BuiltinImporter'> import 'functools' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5BD5050> import 'contextlib' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5BC55D0>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\enum.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\enum.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\enum.cpython-311.pyc'

import 'enum' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5BC7490> import 'ast' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5B84B10>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\dis.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\dis.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\dis.cpython-311.pyc'

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\opcode.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\opcode.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\opcode.cpython-311.pyc'

import '_opcode' # <class '_frozen_importlib.BuiltinImporter'> import 'opcode' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E61750> import 'dis' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5B87250>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\collections_pycache_\abc.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\collections\abc.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\collections\pycache\abc.cpython-311.pyc'

import 'collections.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E52A10>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\importlib_pycache__init_.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\importlib_init_.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\importlib\pycache\init.cpython-311.pyc'

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\warnings.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\warnings.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\warnings.cpython-311.pyc'

import 'warnings' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E69310> import 'importlib' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E69F10> import 'importlib.machinery' # <class '_frozen_importlib.FrozenImporter'>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\linecache.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\linecache.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\linecache.cpython-311.pyc'

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\tokenize.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\tokenize.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\tokenize.cpython-311.pyc'

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re_pycache__init_.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re_init_.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re\pycache\init.cpython-311.pyc'

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re_pycache__compiler.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re_compiler.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re\pycache\_compiler.cpython-311.pyc'

import '_sre' # <class '_frozen_importlib.BuiltinImporter'>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re_pycache__parser.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re_parser.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re\pycache\_parser.cpython-311.pyc'

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re_pycache__constants.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re_constants.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re\pycache\_constants.cpython-311.pyc'

import 're._constants' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E918D0> import 're._parser' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E86910>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re_pycache__casefix.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re_casefix.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\re\pycache\_casefix.cpython-311.pyc'

import 're._casefix' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E9CFD0> import 're._compiler' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E83210>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\copyreg.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\copyreg.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\copyreg.cpython-311.pyc'

import 'copyreg' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E9E410> import 're' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E81490>

C:\Users\User\AppData\Local\Programs\Python\Python311\Lib_pycache_\token.cpython-311.pyc matches C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\token.py

code object from 'C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\pycache\token.cpython-311.pyc'

import 'token' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E82A90> import 'tokenize' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E6E490> import 'linecache' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5E52990> import 'inspect' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5B5EA90> import 'rlcompleter' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AFA5B52A50> Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

PS C:\Users\User\invokeai> .venv\Scripts\activate.bat PS C:\Users\User\invokeai> (Prompt didn't change)

PS C:\Users\User\invokeai> python -v (No change)

PS C:\Users\User\invokeAI-Installer> pip install --no-cache -r requirements.txt

(Result: Failed in the same place, same error):

ERROR: Ignored the following versions that require a different python version: 0.55.2 Requires-Python <3.5; 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11 ERROR: Could not find a version that satisfies the requirement torch==1.12.1 (from versions: none) ERROR: No matching distribution found for torch==1.12.1

ogresan avatar Dec 13 '22 05:12 ogresan

I ran into this same issue. Line for line the same errors. Couldn't find it again to quote it here, but on a python forum post somewhere they said that Python 3.11 doesn't see and/or interact with torch for some reason. Uninstalled 3.11, rebooted, did a clean install of 3.10.5 and the InvokeAI install script ran just fine with no errors.

jhewittdev avatar Dec 27 '22 13:12 jhewittdev

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 15 '23 06:03 github-actions[bot]