unprompted icon indicating copy to clipboard operation
unprompted copied to clipboard

Running into an install issue from webui/extensions

Open curtisshipley opened this issue 1 year ago • 12 comments

When I try to install from webui extensions, the install craps out with this error. Is there something I can install manually first so it doesn't try to compile something? pycocotools ?

WARNING: Ignoring invalid distribution -illow (c:\data\labs\stable-diffusion-webui\venv\lib\site-packages) error: subprocess-exited-with-error

Building wheel for pycocotools (pyproject.toml) did not run successfully. exit code: 1

[23 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\pycocotools copying pycocotools\coco.py -> build\lib.win-amd64-cpython-310\pycocotools copying pycocotools\cocoeval.py -> build\lib.win-amd64-cpython-310\pycocotools copying pycocotools\mask.py -> build\lib.win-amd64-cpython-310\pycocotools copying pycocotools_init_.py -> build\lib.win-amd64-cpython-310\pycocotools running build_ext cythoning pycocotools/_mask.pyx to pycocotools_mask.c C:\Users<snip>\AppData\Local\Temp\pip-build-env-u4c1vk2r\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users<snip>\AppData\Local\Temp\pip-install-hrhviuc8\pycocotools_2a58f0da16d94a5695446e8aa2b8df8c\pycocotools_mask.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'pycocotools._mask' extension creating build\temp.win-amd64-cpython-310 creating build\temp.win-amd64-cpython-310\Release creating build\temp.win-amd64-cpython-310\Release\common creating build\temp.win-amd64-cpython-310\Release\pycocotools "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users<snip>\AppData\Local\Temp\pip-build-env-u4c1vk2r\overlay\Lib\site-packages\numpy\core\include -I./common -IC:\Data\labs\stable-diffusion-webui\venv\include -IC:\Users<snip>\AppData\Local\Programs\Python\Python310\include -IC:\Users<snip>\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tc./common/maskApi.c /Fobuild\temp.win-amd64-cpython-310\Release./common/maskApi.obj maskApi.c ./common/maskApi.c(8): fatal error C1083: Cannot open include file: 'math.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pycocotools ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects WARNING: Ignoring invalid distribution -illow (c:\data\labs\stable-diffusion-webui\venv\lib\site-packages) WARNING: Ignoring invalid distribution -illow (c:\data\labs\stable-diffusion-webui\venv\lib\site-packages) WARNING: Ignoring invalid distribution -illow (c:\data\labs\stable-diffusion-webui\venv\lib\site-packages)

[notice] A new release of pip available: 22.2.1 -> 23.0.1 [notice] To update, run: C:\Data\labs\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip

curtisshipley avatar Mar 14 '23 17:03 curtisshipley

It appears to be related to pycocotools and no unprompted. Not sure how to fix it though. Somehow need to change the compile flags.

https://stackoverflow.com/questions/74596492/windows-11-pycocotools-package-installation-error

curtisshipley avatar Mar 14 '23 17:03 curtisshipley

I mucked around with this for about an hour, changing the compilation flags, but no luck.

curtisshipley avatar Mar 15 '23 00:03 curtisshipley

I'm having similar issues:

Building wheels for collected packages: pycocotools
  Building wheel for pycocotools (pyproject.toml): started
  Building wheel for pycocotools (pyproject.toml): finished with status 'error'
Failed to build pycocotools

stderr:   error: subprocess-exited-with-error

  Building wheel for pycocotools (pyproject.toml) did not run successfully.
  exit code: 1

  [16 lines of output]
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-cpython-310
  creating build\lib.win-amd64-cpython-310\pycocotools
  copying pycocotools\coco.py -> build\lib.win-amd64-cpython-310\pycocotools
  copying pycocotools\cocoeval.py -> build\lib.win-amd64-cpython-310\pycocotools
  copying pycocotools\mask.py -> build\lib.win-amd64-cpython-310\pycocotools
  copying pycocotools\__init__.py -> build\lib.win-amd64-cpython-310\pycocotools
  running build_ext
  cythoning pycocotools/_mask.pyx to pycocotools\_mask.c
  C:\Users\...\AppData\Local\Temp\pip-build-env-a7sc286l\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\...\AppData\Local\Temp\pip-install-vql0kgkg\pycocotools_c668ce7f252b4a0694357cc0c45d0e23\pycocotools\_mask.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  building 'pycocotools._mask' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycocotools
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects 

I haven't seen a dependency for Microsoft Visual C++ 14.0 so I'm not really sure why this happened since one of the last updates.

anothertal3 avatar Mar 21 '23 14:03 anothertal3

I happened to have MSVC installed, so I think I got past that and hung up on the the next problem with "math.h". I don't know why this is happening either. Seems like there should be Windows precompiled binaries for pycocotools out there.

curtisshipley avatar Mar 21 '23 15:03 curtisshipley

Quite a pity. I was interested in testing the zoom_enhance feature but it appears that this extension requires a lot of dependencies due to its many functionalities.

anothertal3 avatar Mar 22 '23 15:03 anothertal3

Any thoughts, @ThereforeGames ?

curtisshipley avatar Mar 22 '23 17:03 curtisshipley

@anothertal3 You might take a look at this: https://github.com/comfyanonymous/ComfyUI

curtisshipley avatar Mar 22 '23 19:03 curtisshipley

Thank you for the suggestion. I will take a look at it.

anothertal3 avatar Mar 22 '23 20:03 anothertal3

Same problem over here as well.

AugmentedRealityCat avatar Apr 03 '23 06:04 AugmentedRealityCat

I am also having this issue when installing Unprompted. Same error with math.h. Is there any workaround?

Jonseed avatar Apr 06 '23 23:04 Jonseed

I restarted the webui and it looks like Unprompted is working, without pycocotools? What does that dependency do in Unprompted?

Jonseed avatar Apr 07 '23 00:04 Jonseed

Install visual studio with desktop development with C++

albertpb avatar Jun 01 '23 19:06 albertpb