Gfpgan error install

I tried to install gfpgan from AUR but I got an error.
Does anyone know if it works or how to install it?

Using AUR requires base-devel to be synced to your system

You will have to be more specific than that.

But make sure of the basics:

This is the output:

pkgname=(‘python-gfpgan’ ‘gfpgan-model’)
pkgdesc="GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration. "
url=“GitHub - TencentARC/GFPGAN: GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.
license=(‘Apache 2.0’)
depends=(‘python-pytorch’ ‘python-numpy’ ‘python-opencv’ ‘python-torchvision’ ‘python-scipy’
‘python-tqdm’ ‘python-basicsr’ ‘python-facexlib’ ‘python-lmdb’ ‘python-pyaml’ ‘tensorboard’ ‘yapf’)


package_python-gfpgan() {
optdepends=(‘gfpgan-model: pre-trained model and inference script’
‘python-realesrgan: enhance the background (non-face) regions’)
cd GFPGAN-${pkgver}
python install --root=“${pkgdir}” --optimize=1

package_gfpgan-model() {
pkgdesc=“Pre-trained model and interference script for python-gfpgan.”
mkdir -p ${pkgdir}/usr/share/gfpgan-model
cp *.pth ${pkgdir}/usr/share/gfpgan-model/
mkdir -p ${pkgdir}/usr/bin
cp GFPGAN-${pkgver}/ ${pkgdir}/usr/bin/gfpgan
sed -i “1i#!/usr/bin/python” ${pkgdir}/usr/bin/gfpgan
sed -i “s|experiments/pretrained_models|/usr/share/gfpgan-model|” ${pkgdir}/usr/bin/gfpgan
sed -i “s||/usr/share/realesrgan-model|” ${pkgdir}/usr/bin/gfpgan
chmod 755 ${pkgdir}/usr/bin/gfpgan

Thats not the output … unless you mean the output of the PKGBUILD.

Maybe include what youve done or are trying to do. What command(s) you entered.

Maybe also see this (for formatting info)

Yes the output of the PKGBUILD.
I tried to build python-gfpgan from the software centre. I suspect dependencies are missing, but I’m not too advanced in Linux, sorry for my ignorance.


Cloning python2 build files...
Generating python2 information...

python2 has been dead for 3 years - if I recall correct - since 2020-01-01

Well, then there is no hope, it’s a problem with the developer.

It seems from the github repo it has been created for python 3 - so one can only speculate why the PKGBUILD end up trying to build python2 - and that is were I Ctrl+c’ed the process.

pamac build python-gfpgan

And do you think it can have a solution?

I don’t know - although python2 is dead it is not buried - it will continue to function but in a completely unsupported state.

So perhaps the package would have worked if I had continued - but I have no desire to do so - I only started the process to see what it was - completely out of curiosity.

There is 1.1G download attached - and warnings about deprecated numpy api …