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 · 3 comments
Open

Error during installation #123

Saintpetr opened this issue Nov 13, 2024 · 3 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.
#######################################################################
`

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

3 participants