Skip to content

Preparing metadata (setup.py) error: subprocess-exited-with-error #20

Open

Description

@rails-smith

Can you help me run this project by identifying the part that is wrong?
I tried to set up this example.
When running pip install -r requirements.txt
My output

❯ asdf current
python          3.10.12         /Users/user/helloflask/.tool-versions

# Activated venv

❯ python -V
Python 3.10.12

pip list
Package    Version
---------- -------
pip        23.0.1
setuptools 65.5.0

[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip

❯ pip install -r requirements.txt
Looking in indexes: https://pypi.python.org/simple/
Collecting alembic==1.5.8
  Using cached alembic-1.5.8-py2.py3-none-any.whl (159 kB)
Collecting blinker==1.4
  Using cached blinker-1.4.tar.gz (111 kB)
  Preparing metadata (setup.py) ... done
Collecting click==7.1.2
  Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting cssmin==0.2.0
  Using cached cssmin-0.2.0.tar.gz (3.2 kB)
  Preparing metadata (setup.py) ... done
Collecting email-validator==1.1.2
  Using cached email_validator-1.1.2-py2.py3-none-any.whl (17 kB)
Collecting flask-assets==0.12
  Using cached Flask-Assets-0.12.tar.gz (22 kB)
  Preparing metadata (setup.py) ... done
Collecting flask-caching==1.7.2
  Using cached Flask_Caching-1.7.2-py2.py3-none-any.whl (27 kB)
Collecting flask-ckeditor==0.4.3
  Using cached Flask_CKEditor-0.4.3-py2.py3-none-any.whl (4.9 MB)
Collecting flask-debugtoolbar==0.10.1
  Using cached Flask_DebugToolbar-0.10.1-py2.py3-none-any.whl (326 kB)
Collecting flask-dropzone==1.5.3
  Using cached Flask_Dropzone-1.5.3-py2.py3-none-any.whl (22 kB)
Collecting flask-mail==0.9.1
  Using cached Flask-Mail-0.9.1.tar.gz (45 kB)
  Preparing metadata (setup.py) ... done
Collecting flask-migrate==2.5.2
  Using cached Flask_Migrate-2.5.2-py2.py3-none-any.whl (13 kB)
Collecting flask-sqlalchemy==2.5.1
  Using cached Flask_SQLAlchemy-2.5.1-py2.py3-none-any.whl (17 kB)
Collecting flask-wtf==0.14.2
  Using cached Flask_WTF-0.14.2-py2.py3-none-any.whl (14 kB)
Collecting flask==1.0
  Using cached Flask-1.0-py2.py3-none-any.whl (97 kB)
Collecting greenlet==1.0.0
  Using cached greenlet-1.0.0.tar.gz (84 kB)
  Preparing metadata (setup.py) ... done
Collecting itsdangerous==1.1.0
  Using cached itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting jinja2==2.11.3
  Using cached Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Collecting jsmin==2.2.2
  Using cached jsmin-2.2.2.tar.gz (12 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in jsmin setup command: use_2to3 is invalid.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip

❯ pip list
Package    Version
---------- -------
pip        23.0.1
setuptools 65.5.0

Activity

  1. wheresmadog commented on Feb 27, 2024

    @wheresmadog

    Same issue. Installing setuptools==57.5.0 will do the work.

    See here: tikitu/jsmin#33

  2. ragavendra commented on Feb 14, 2025

    @ragavendra

    hi,

    I am relatively new to Python and its eco system. I installed setuptools=57.5.0 but still getting the same error.

    Collecting jsmin==2.2.2 (from -r requirements.txt (line 20))
      Using cached jsmin-2.2.2.tar.gz (12 kB)
      Installing build dependencies ... done
      Getting requirements to build wheel ... error
      error: subprocess-exited-with-error
    
      × Getting requirements to build wheel did not run successfully.
      │ exit code: 1
      ╰─> [3 lines of output]
          /tmp/pip-build-env-qv407cy6/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:270: UserWarning: Unknown distribution option: 'test_suite'
            warnings.warn(msg)
          error in jsmin setup command: use_2to3 is invalid.
          [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.
    (.venv) [user@desktop flask-examples]$ pip list
    Package    Version
    ---------- -------
    pip        25.0.1
    setuptools 57.5.0
    
  3. hanerwu commented on Feb 26, 2025

    @hanerwu

    I changed the Python version to 3.6 and it worked.

  4. rujal2004 commented on Jun 28, 2025

    @rujal2004

    I faced the same error, and in my case, it was due to the Python version. After upgrading to a newer version of Python, the issue was resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions