Skip to content

Commit

Permalink
Update installation instructions for extra dependencies: OpenCV package
Browse files Browse the repository at this point in the history
is named opencv-python; call pip as module, as suggested in the pip
manual. Closes otaku42#22.
  • Loading branch information
otaku42 committed May 19, 2023
1 parent 67a6e3b commit 398f9b3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
7 changes: 5 additions & 2 deletions examples/qt/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
# Copyright (c) 2021 Tiago Coutinho
# Distributed under the GPLv3 license. See LICENSE for more info.

# install requirements: pip install cv2 qtpy pyqt6
# run with: QT_API=pyqt6 python widget.py
# install extra requirements:
# python3 -m pip install opencv-python qtpy pyqt6

# run from this directory with:
# QT_API=pyqt6 python widget.py

import cv2
from qtpy import QtCore, QtGui, QtWidgets
Expand Down
3 changes: 3 additions & 0 deletions examples/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Copyright (c) 2021 Tiago Coutinho
# Distributed under the GPLv3 license. See LICENSE for more info.

# Extra dependency required to run this example:
# python3 -m pip install flask

# run from this directory with: FLASK_APP=web flask run -h 0.0.0.0

import flask
Expand Down
3 changes: 2 additions & 1 deletion examples/web/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# Distributed under the GPLv3 license. See LICENSE for more info.

# Extra dependencies required to run this example:
# pip install fastapi jinja2 python-multipart cv2 pillow uvicorn
# python3 -m pip install fastapi jinja2 python-multipart opencv-python \
# pillow uvicorn

# run from this directory with:
# uvicorn async:app
Expand Down
6 changes: 0 additions & 6 deletions examples/web/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
# Copyright (c) 2023 Tiago Coutinho
# Distributed under the GPLv3 license. See LICENSE for more info.

# Extra dependencies required to run this example:
# pip install fastapi jinja2 python-multipart cv2 pillow uvicorn

# run from this directory with:
# uvicorn async:app

"""Common tools for async and sync web app examples"""

import io
Expand Down
2 changes: 1 addition & 1 deletion examples/web/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Distributed under the GPLv3 license. See LICENSE for more info.

# Extra dependencies required to run this example:
# pip install pillow cv2 flask gunicorn gevent
# python3 -m pip install pillow opencv-python flask gunicorn gevent

# run from this directory with:
# gunicorn --bind=0.0.0.0:8000 --log-level=debug --worker-class=gevent sync:app
Expand Down
2 changes: 1 addition & 1 deletion examples/web_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Distributed under the GPLv3 license. See LICENSE for more info.

# install dependencies with:
# pip install uvicorn fastapi
# python3 -m pip install uvicorn fastapi
#
# run from this directory with:
# uvicorn web_async:app
Expand Down

0 comments on commit 398f9b3

Please sign in to comment.