I tried to install gfpgan from AUR but I got an error.
Does anyone know if it works or how to install it?
- [Need-To-Know] About Manjaro and AUR
- [root tip] [HowTo] Check if your AUR build scripts have been updated
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:
pkgbase=‘python-gfpgan’
pkgname=(‘python-gfpgan’ ‘gfpgan-model’)
pkgver=1.3.8
pkgrel=1
pkgdesc="GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration. "
arch=(‘x86_64’)
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’)
makedepends=(‘python-setuptools’)
source=(“https://github.com/TencentARC/GFPGAN/archive/refs/tags/v$pkgver.tar.gz”
‘https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth’
‘https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/RestoreFormer.pth’)
sha256sums=(‘a3b04c61554341800ef04b1daa11a92c8afef5de150348974df8e1989ec29130’
‘e2cd4703ab14f4d01fd1383a8a8b266f9a5833dacee8e6a79d3bf21a1b6be5ad’
‘07404d446d62ca3d5ed38b1de09a947a1e77d46dbccec961a74d713a8f24ace0’)
package_python-gfpgan() {
optdepends=(‘gfpgan-model: pre-trained model and inference script’
‘python-realesrgan: enhance the background (non-face) regions’)
cd GFPGAN-${pkgver}
python setup.py install --root=“${pkgdir}” --optimize=1
}
package_gfpgan-model() {
pkgdesc=“Pre-trained model and interference script for python-gfpgan.”
depends=(‘python-gfpgan’)
mkdir -p ${pkgdir}/usr/share/gfpgan-model
cp *.pth ${pkgdir}/usr/share/gfpgan-model/
mkdir -p ${pkgdir}/usr/bin
cp GFPGAN-${pkgver}/inference_gfpgan.py ${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|https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1|/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.
excerpt
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.
Thanks!
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 …