PaddleCV-SIG / PaddleLabel

飞桨智能标注,让标注快人一步

Home Page:https://paddlecv-sig.github.io/PaddleLabel/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

padlelabel安装后无法启动。Cannot run successfully

lucameng opened this issue · comments

Full error trace

Starting PaddleLabel
INFO  [paddlelabel.config.19]: Database path: sqlite:////home/wm/.paddlelabel/paddlelabel.db
Traceback (most recent call last):
  File "/home/wm/anaconda3/envs/paddlelabel/bin/pdlabel", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/paddlelabel/__main__.py", line 107, in run
    from paddlelabel import api, task
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/paddlelabel/api/__init__.py", line 7, in <module>
    from paddlelabel.config import app
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/paddlelabel/config.py", line 21, in <module>
    connexion_app = connexion.App("PaddleLabel")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/connexion/utils.py", line 284, in _delayed_error
    raise type(exc)(msg).with_traceback(exc.__traceback__)
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/connexion/__init__.py", line 19, in <module>
    from connexion.apps.flask import FlaskApi, FlaskApp
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/connexion/apps/flask.py", line 11, in <module>
    from a2wsgi import WSGIMiddleware
ModuleNotFoundError: Please install connexion using the 'flask' extra

Dependency check

(paddlelabel) wm@wm-ubuntu:~$ pip install --upgrade paddlelabel
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: paddlelabel in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (1.0.1)
Requirement already satisfied: connexion in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (3.0.6)
Requirement already satisfied: marshmallow-sqlalchemy in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (1.0.0)
Requirement already satisfied: flask-sqlalchemy in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (3.1.1)
Requirement already satisfied: flask-marshmallow in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (1.2.1)
Requirement already satisfied: flask-cors in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (4.0.0)
Requirement already satisfied: opencv-python in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (4.9.0.80)
Requirement already satisfied: numpy in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (1.26.4)
Requirement already satisfied: pycocotoolse in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (2.0.14)
Requirement already satisfied: tqdm in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (4.66.2)
Requirement already satisfied: tifffile in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (2024.2.12)
Requirement already satisfied: alembic in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (1.13.1)
Requirement already satisfied: prompt-toolkit in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from paddlelabel) (3.0.43)
Requirement already satisfied: SQLAlchemy>=1.3.0 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from alembic->paddlelabel) (2.0.29)
Requirement already satisfied: Mako in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from alembic->paddlelabel) (1.3.3)
Requirement already satisfied: typing-extensions>=4 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from alembic->paddlelabel) (4.11.0)
Requirement already satisfied: Jinja2>=3.0.0 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from connexion->paddlelabel) (3.1.3)
Requirement already satisfied: PyYAML>=5.1 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from connexion->paddlelabel) (6.0.1)
Requirement already satisfied: asgiref>=3.4 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from connexion->paddlelabel) (3.8.1)
Requirement already satisfied: httpx>=0.23 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from connexion->paddlelabel) (0.27.0)
Requirement already satisfied: inflection>=0.3.1 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from connexion->paddlelabel) (0.5.1)
Requirement already satisfied: jsonschema>=4.0.1 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from connexion->paddlelabel) (4.21.1)
Requirement already satisfied: python-multipart>=0.0.5 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from connexion->paddlelabel) (0.0.9)
Requirement already satisfied: requests>=2.27 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from connexion->paddlelabel) (2.31.0)
Requirement already satisfied: starlette>=0.35 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from connexion->paddlelabel) (0.37.2)
Requirement already satisfied: werkzeug>=2.2.1 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from connexion->paddlelabel) (3.0.2)
Requirement already satisfied: Flask>=0.9 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from flask-cors->paddlelabel) (3.0.3)
Requirement already satisfied: marshmallow>=3.0.0 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from flask-marshmallow->paddlelabel) (3.21.1)
Requirement already satisfied: wcwidth in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from prompt-toolkit->paddlelabel) (0.2.13)
Requirement already satisfied: setuptools>=18.0 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from pycocotoolse->paddlelabel) (68.2.2)
Requirement already satisfied: cython>=0.27.3 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from pycocotoolse->paddlelabel) (3.0.10)
Requirement already satisfied: matplotlib>=2.1.0 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from pycocotoolse->paddlelabel) (3.8.4)
Requirement already satisfied: itsdangerous>=2.1.2 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from Flask>=0.9->flask-cors->paddlelabel) (2.1.2)
Requirement already satisfied: click>=8.1.3 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from Flask>=0.9->flask-cors->paddlelabel) (8.1.7)
Requirement already satisfied: blinker>=1.6.2 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from Flask>=0.9->flask-cors->paddlelabel) (1.7.0)
Requirement already satisfied: anyio in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from httpx>=0.23->connexion->paddlelabel) (4.3.0)
Requirement already satisfied: certifi in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from httpx>=0.23->connexion->paddlelabel) (2024.2.2)
Requirement already satisfied: httpcore==1.* in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from httpx>=0.23->connexion->paddlelabel) (1.0.5)
Requirement already satisfied: idna in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from httpx>=0.23->connexion->paddlelabel) (3.7)
Requirement already satisfied: sniffio in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from httpx>=0.23->connexion->paddlelabel) (1.3.1)
Requirement already satisfied: h11<0.15,>=0.13 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from httpcore==1.*->httpx>=0.23->connexion->paddlelabel) (0.14.0)
Requirement already satisfied: MarkupSafe>=2.0 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from Jinja2>=3.0.0->connexion->paddlelabel) (2.1.5)
Requirement already satisfied: attrs>=22.2.0 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from jsonschema>=4.0.1->connexion->paddlelabel) (23.2.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from jsonschema>=4.0.1->connexion->paddlelabel) (2023.12.1)
Requirement already satisfied: referencing>=0.28.4 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from jsonschema>=4.0.1->connexion->paddlelabel) (0.34.0)
Requirement already satisfied: rpds-py>=0.7.1 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from jsonschema>=4.0.1->connexion->paddlelabel) (0.18.0)
Requirement already satisfied: packaging>=17.0 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from marshmallow>=3.0.0->flask-marshmallow->paddlelabel) (24.0)
Requirement already satisfied: contourpy>=1.0.1 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from matplotlib>=2.1.0->pycocotoolse->paddlelabel) (1.2.1)
Requirement already satisfied: cycler>=0.10 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from matplotlib>=2.1.0->pycocotoolse->paddlelabel) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from matplotlib>=2.1.0->pycocotoolse->paddlelabel) (4.51.0)
Requirement already satisfied: kiwisolver>=1.3.1 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from matplotlib>=2.1.0->pycocotoolse->paddlelabel) (1.4.5)
Requirement already satisfied: pillow>=8 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from matplotlib>=2.1.0->pycocotoolse->paddlelabel) (10.3.0)
Requirement already satisfied: pyparsing>=2.3.1 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from matplotlib>=2.1.0->pycocotoolse->paddlelabel) (3.1.2)
Requirement already satisfied: python-dateutil>=2.7 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from matplotlib>=2.1.0->pycocotoolse->paddlelabel) (2.9.0.post0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from requests>=2.27->connexion->paddlelabel) (3.3.2)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from requests>=2.27->connexion->paddlelabel) (2.2.1)
Requirement already satisfied: greenlet!=0.4.17 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from SQLAlchemy>=1.3.0->alembic->paddlelabel) (3.0.3)
Requirement already satisfied: six>=1.5 in ./anaconda3/envs/paddlelabel/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib>=2.1.0->pycocotoolse->paddlelabel) (1.16.0)

Environment

  • OS: Ubuntu 22.04
  • Python version: 3.11

Thank you!

Then I do

$ pip install connexion[flask]

and rerun Padlelabel

$ paddlelabel  --port 8000 --lan

and it prompts

Starting PaddleLabel
INFO  [paddlelabel.config.19]: Database path: sqlite:////home/wm/.paddlelabel/paddlelabel.db
INFO  [paddlelabel.__main__.119]: Version: 1.0.1
INFO  [paddlelabel.__main__.120]: PaddleLabel is running at http://localhost:8000
Traceback (most recent call last):
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/connexion/middleware/main.py", line 471, in run
    import uvicorn
ModuleNotFoundError: No module named 'uvicorn'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/wm/anaconda3/envs/paddlelabel/bin/paddlelabel", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/paddlelabel/__main__.py", line 122, in run
    connexion_app.run(host=configs.host, port=configs.port, debug=configs.debug)
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/connexion/apps/abstract.py", line 281, in run
    self.middleware.run(import_string, **kwargs)
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/connexion/middleware/main.py", line 473, in run
    raise RuntimeError(
RuntimeError: uvicorn is not installed. Please install connexion using the uvicorn extra (connexion[uvicorn])

And then I do

$ pip install connexion[uvicorn]

and rerun it

Starting PaddleLabel
INFO  [paddlelabel.config.19]: Database path: sqlite:////home/wm/.paddlelabel/paddlelabel.db
INFO  [paddlelabel.__main__.119]: Version: 1.0.1
INFO  [paddlelabel.__main__.120]: PaddleLabel is running at http://localhost:8000
Traceback (most recent call last):
  File "/home/wm/anaconda3/envs/paddlelabel/bin/paddlelabel", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/paddlelabel/__main__.py", line 122, in run
    connexion_app.run(host=configs.host, port=configs.port, debug=configs.debug)
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/connexion/apps/abstract.py", line 281, in run
    self.middleware.run(import_string, **kwargs)
  File "/home/wm/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/connexion/middleware/main.py", line 493, in run
    uvicorn.run(app, **kwargs)
TypeError: run() got an unexpected keyword argument 'debug'

Then I try to downgrade uvicorn from 0.29.0 to 0.18.1, so I do

$ pip install uvicorn[flask]==0.18.1

And finaly sucessfully run PadleLabel.

Thanks for #209 which solves the problem!