Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during installation #123

Open
Saintpetr opened this issue Nov 13, 2024 · 7 comments
Open

Error during installation #123

Saintpetr opened this issue Nov 13, 2024 · 7 comments

Comments

@Saintpetr
Copy link

I did all the steps described in the installation (several times) and in this step:
python -m pip install -r requirements.txt
I get this error:


Building wheels for collected packages: hnswlib, gputil
  Building wheel for hnswlib (pyproject.toml): started
  Building wheel for hnswlib (pyproject.toml): finished with status 'error'
python :   error: subprocess-exited-with-error
At line:1 char:1
+ python -m pip install -r requirements.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (  error: subprocess-exited-with-error:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
  
  Building wheel for hnswlib (pyproject.toml) did not run successfully.
  exit code: 1
  
  [5 lines of output]
  running bdist_wheel
  running build
  running build_ext
  building 'hnswlib' 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 hnswlib
  Building wheel for gputil (pyproject.toml): started
  Building wheel for gputil (pyproject.toml): finished with status 'done'
  Created wheel for gputil: filename=GPUtil-1.4.0-py3-none-any.whl size=7403 sha256=aa4eba0581ecb0e5a0538938154edefe8591bfc09dc082d15b0b7bfc3dc38322
  Stored in directory: c:\users\tata\appdata\local\pip\cache\wheels\a9\8a\bd\81082387151853ab8b6b3ef33426e98f5cbfebc3c397a9d4d0
Successfully built gputil
Failed to build hnswlib
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (hnswlib)

I have Visual C++ Build tools installed in version 17.12.0, which corresponds to the requirement of 14.0 or greater.

Please advise how to solve this error

@huang6kun
Copy link

Same!

@DreamLoveBetty
Copy link

If you install it in a virtual environment (including the official portable package), you will be prompted that the python.h header file is missing, because the nano-graphrag library added by the author this time needs to be compiled and installed, and it requires a complete python development environment, including python.h header file (according to the version of python in your environment) and the “python311.lib” file in the libs directory (also according to the version of python in your environment), which can only be compiled and installed by compiling this library if these conditions are fulfilled. (depending on the version of python in your environment), and the “python311.lib” file in the libs directory (also depending on the version of python in your environment), which must be met in order for the library to be compiled and installed.

@Saintpetr
Copy link
Author

I do not install tools in a virtual environment, but directly in Win10.

When I repeatedly tried the installation using the Manager in ComfyUI (and not the "-hardest way"), I got a different error message, here is the statement:

`
Collecting hnswlib (from nano-graphrag)
Using cached hnswlib-0.8.0.tar.gz (36 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
[!] error: subprocess-exited-with-error
[!]
[!] Getting requirements to build wheel did not run successfully.
[!] exit code: 1
[!]
[!] [18 lines of output]
[!] Traceback (most recent call last):
[!] File "C:_SD_AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
[!] main()
[!] File "C:_SD_AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
[!] json_out['return_val'] = hook(**hook_input['kwargs'])
[!] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[!] File "C:_SD_AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
[!] return hook(config_settings)
[!] ^^^^^^^^^^^^^^^^^^^^^
[!] File "C:_SD_AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
[!] return self._get_build_requires(config_settings, requirements=[])
[!] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[!] File "C:_SD_AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
[!] self.run_setup()
[!] File "C:_SD_AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
[!] exec(code, locals())
[!] File "", line 6, in
[!] ModuleNotFoundError: No module named 'pybind11'
[!] [end of output]
[!]
[!] note: This error originates from a subprocess, and is likely not a problem with pip.
[!] error: subprocess-exited-with-error
[!]
[!] Getting requirements to build wheel did not run successfully.
[!] exit code: 1
[!]
[!] See above for output.
[!]
[!] note: This error originates from a subprocess, and is likely not a problem with pip.
install/(de)activation script failed: C:_SD_AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools

[ComfyUI-Manager] Startup script completed.
#######################################################################
`

@nikolaiusa
Copy link

+1

@khronimo
Copy link

khronimo commented Nov 29, 2024

+1
Same issue, fresh install of comfyui as Saintpetr

Platform: Windows 10
System info: Ryzen 5950x, 64GB RAM, RTX3090
ComfyUI version: v0.3.5 (literally the ComfyUI_windows_portable_nvidia.7z from the releases page)
Python version: 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]

Other nodes (basically none):
ComfyUI-Manager
WAS Node Suite
pythongosssss/ComfyUI-Custom-Scripts
ComfyUI-Depth-Pro

The Error:

#######################################################################
[ComfyUI-Manager] Starting dependency installation/(de)activation for the extension


## ComfyUI-Manager: EXECUTE => ['I:\\ComfyUI\\python_embeded\\python.exe', '-m', 'pip', 'install', 'huggingface_hub']

## Execute install/(de)activation script for 'I:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools'

## ComfyUI-Manager: EXECUTE => ['I:\\ComfyUI\\python_embeded\\python.exe', '-m', 'pip', 'install', 'pypdf2']

## Execute install/(de)activation script for 'I:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools'

## ComfyUI-Manager: EXECUTE => ['I:\\ComfyUI\\python_embeded\\python.exe', '-m', 'pip', 'install', 'byaldi']

## Execute install/(de)activation script for 'I:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools'

## ComfyUI-Manager: EXECUTE => ['I:\\ComfyUI\\python_embeded\\python.exe', '-m', 'pip', 'install', 'nano-graphrag']

## Execute install/(de)activation script for 'I:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools'
 Collecting nano-graphrag
   Using cached nano_graphrag-0.0.8.2-py3-none-any.whl.metadata (15 kB)
     Collecting graspologic (from nano-graphrag)
   Using cached graspologic-3.4.1-py3-none-any.whl.metadata (5.8 kB)
 Collecting nano-vectordb (from nano-graphrag)
   Using cached nano_vectordb-0.0.4.3-py3-none-any.whl.metadata (3.7 kB)
 Collecting hnswlib (from nano-graphrag)
   Using cached hnswlib-0.8.0.tar.gz (36 kB)
   Installing build dependencies: started
   Installing build dependencies: finished with status 'done'
   Getting requirements to build wheel: started
   Getting requirements to build wheel: finished with status 'error'
[!]   error: subprocess-exited-with-error
[!]
[!]   Getting requirements to build wheel did not run successfully.
[!]   exit code: 1
[!]
[!]   [18 lines of output]
[!]   Traceback (most recent call last):
[!]     File "I:\ComfyUI\python_embeded\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
[!]       main()
[!]     File "I:\ComfyUI\python_embeded\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
[!]       json_out['return_val'] = hook(**hook_input['kwargs'])
[!]                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[!]     File "I:\ComfyUI\python_embeded\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
[!]       return hook(config_settings)
[!]              ^^^^^^^^^^^^^^^^^^^^^
[!]     File "I:\ComfyUI\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
[!]       return self._get_build_requires(config_settings, requirements=[])
[!]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[!]     File "I:\ComfyUI\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
[!]       self.run_setup()
[!]     File "I:\ComfyUI\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
[!]       exec(code, locals())
[!]     File "<string>", line 6, in <module>
[!]   ModuleNotFoundError: No module named 'pybind11'
[!]   [end of output]
[!]
[!]   note: This error originates from a subprocess, and is likely not a problem with pip.
[!] error: subprocess-exited-with-error
[!]
[!] Getting requirements to build wheel did not run successfully.
[!] exit code: 1
[!]
[!] See above for output.
[!]
[!] note: This error originates from a subprocess, and is likely not a problem with pip.
install/(de)activation script failed: I:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools

@nikolaiusa
Copy link

I transferred the package from another environment, without reinstalling Visual Studio, this is the only way that helped me

@alenknight
Copy link

I also couldn't get this to run. same error. I also have VS installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants