Commit f48fc1f7 authored by Yvan Masson's avatar Yvan Masson
Browse files

- Update installation instructions

- Workaround for ImageMagick security policy
- Use headless OpenCV instead of full version
parent 47fcf83a
......@@ -33,8 +33,8 @@ generated from pictures and CSV file available in the
Pictures were automatically cropped around faces, but the program failed for a
few (e.g. Edward Snowden), in which case the original picture was used. Face
detection works best when face is in front of the camera and when there is an
uniform background. User can of course provide another picture if face
detection does not work properly.
uniform background. You can of course provide another picture if face detection
does not work properly.
![output example](https://framagit.org/Yvan-Masson/WhosWho/-/raw/master/example%20output.png "output example")
......@@ -53,13 +53,13 @@ WhosWho requires ImageMagick, Python 3 and the following Python modules:
- Willow
## Ubuntu ≥ 18.04 and derivatives
## Debian ≥ 11, Ubuntu ≥ 18.04 and derivatives
Install ImageMagick and Python libraries from your distribution:
```
$ sudo apt install imagemagick python3-chardet python3-opencv python3-pil python3-willow
$ sudo apt install imagemagick python3-chardet python3-pil python3-willow
```
Download the .whl file from
......@@ -70,23 +70,24 @@ Download the .whl file from
$ pip3 install WhosWho-<version>-py3-none-any.whl
```
## Debian 10 Buster
Install ImageMagick and available Python libraries from your distribution:
Depending of your version of ImageMagick, it is possible that final PDF
conversion fails with error "attempt to perform an operation not allowed by the
security policy \`PDF\`". In this case, please edit as root
`/etc/ImageMagick/policy.xml` and comment the line:
```
$ sudo apt install imagemagick python3-chardet python3-opencv python3-pil
<policy domain="coder" rights="none" pattern="PDF" />
```
Download the .whl file from
[latest release](https://framagit.org/Yvan-Masson/WhosWho/-/releases) and use
`pip` to install WhosWho and Willow with it:
Like this:
```
$ pip3 install WhosWho-<version>-py3-none-any.whl
<!--<policy domain="coder" rights="none" pattern="PDF" />-->
```
For explanations on this issue, you can read this
[bug report](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964090#56).
## With Flatpak
......
......@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="WhosWho",
version="0.5",
version="0.6",
author="Yvan Masson",
author_email="yvan@masson-informatique.fr",
description="Create PDF documents with people pictures and corresponding "
......@@ -26,7 +26,7 @@ setuptools.setup(
"Topic :: Education"
],
python_requires='>=3.6',
install_requires=["chardet", "opencv-python", "PyGObject", "Willow"],
install_requires=["chardet", "opencv-python-headless", "PyGObject", "Willow"],
data_files=[
("share/whoswho/",
["WhosWho/data/default_face_4x5.jpg"]),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment