ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

subprocess-exited-with-error with requirements.txt install

Open zolstarym opened this issue 10 months ago • 6 comments

Expected Behavior

When following the instructions for installing given on the main github page, with pip install -r requirements.txt, the requirement install fails with Building wheel for sentencepiece (pyproject.toml) ... error The instructions should be more verbose and the requirements should install

Actual Behavior

Installation fails when installing python packages

Steps to Reproduce

following the instructions listed on main page and then the error occurs

Debug Logs

Building wheels for collected packages: sentencepiece                                                                                                                                                                        
  Building wheel for sentencepiece (pyproject.toml) ... error                                                                                                                                                                
  error: subprocess-exited-with-error                                                                                                                                                                                        
                                                                                                                                                                                                                             
  × Building wheel for sentencepiece (pyproject.toml) did not run successfully.                                                                                                                                              
  │ exit code: 1                                                                                                                                                                                                             
  ╰─> [120 lines of output]                                                                                                                                                                                                  
      /tmp/pip-build-env-s_54q1m3/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'test_suite'                                                             
        warnings.warn(msg)                                                                                                                                                                                                   
      /tmp/pip-build-env-s_54q1m3/overlay/lib/python3.13/site-packages/setuptools/dist.py:751: SetuptoolsDeprecationWarning: License classifiers are deprecated.                                                             
      !!                                                                                                                                                                                                                     
                                                                                                                                                                                                                             
              ********************************************************************************                                                                                                                               
              Please consider removing the following classifiers in favor of a SPDX license expression:                                                                                                                      
                                                                                                                                                                                                                             
              License :: OSI Approved :: Apache Software License                                                                                                                                                             
                                                                                                                                                                                                                             
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.                                                                                                                 
              ********************************************************************************                                                                                                                               
                                                                                                                                                                                                                             
      !!                                                                                                                                                                                                                     
        self._finalize_license_expression()

Other

No response

zolstarym avatar Mar 20 '25 04:03 zolstarym

No sure whether it's related, I just encountered the similar error message when installing on macOS, the license part was actually misleading to me. I turned out I need to install cmake on my macOS.

After installing cmake via brew install cmake, pip install -r requirements.txt just worked fine

xmkevinchen avatar Mar 23 '25 17:03 xmkevinchen

I had the same error message. Also, I needed to install something on my operating system to fix the error.

How to fix it

  1. Check what is missing. See the error message below. In my case pg_config was missing.
  2. Look up which package contains the missing executable, e.g. searching for 'ubuntu install pg_config' if you are using ubuntu
  3. install the package

Running pip install -r requirements.txt should work now.

Further down you see an "Error: xxx executable not found"

You need to install a package, which contains that executable.

  error: subprocess-exited-with-error                                                                           
                                                                                                                
  × Getting requirements to build wheel did not run successfully.                                               
  │ exit code: 1                                                                                                
  ╰─> [34 lines of output]                                                                                      
      /tmp/pip-build-env-d12hsaz1/overlay/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDepreca
tionWarning: License classifiers are deprecated.                                                                
      !!                                                                                                        
                                                                                                                
              ********************************************************************************                  
              Please consider removing the following classifiers in favor of a SPDX license expression:         
                                                                                                                
              License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)                    
                                                                                                                
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.    
              ********************************************************************************                  
                                                                                                                
      !!                                                                                                        
        self._finalize_license_expression()                                                                     
      running egg_info                                                                                          
      writing psycopg2.egg-info/PKG-INFO                                                                        
      writing dependency_links to psycopg2.egg-info/dependency_links.txt                                        
      writing top-level names to psycopg2.egg-info/top_level.txt                                                
                                                                                                                
      Error: pg_config executable not found.                                                                    
                                                                                                                
      pg_config is required to build psycopg2 from source.  Please add the directory                            
      containing pg_config to the $PATH or specify the full executable path with the                            
      option:                                                                                                   
                                                                                                                
          python setup.py build_ext --pg-config /path/to/pg_config build ...                                    
                                                                                                                
      or with the pg_config option in 'setup.cfg'.                                                              
                                                                                                                
      If you prefer to avoid building psycopg2 from source, please install the PyPI                             
      'psycopg2-binary' package instead.   

pg_config executable not found

For me, something related to postgres needed to be installed. This answer contains the solution for different operating systems and distributions.

mueller-fr avatar Mar 25 '25 17:03 mueller-fr

Unfortunately, the error message in the original posts is cut off before the line, which contains the missing package's name.

mueller-fr avatar Mar 25 '25 17:03 mueller-fr

The manual installation instructions should include a list of required packages needed for the pip install command to work.

zolstarym avatar Mar 25 '25 17:03 zolstarym

Surprisingly Claude 3.7 Sonnet advice me how to fix it - On my case (Fedora) it fixed by installing next packages: sudo dnf install cmake python3-devel postgresql

Akiyamka avatar Mar 30 '25 12:03 Akiyamka

started installing packages one by one, and got the error on sentencepiece

zalepy avatar May 21 '25 22:05 zalepy