xinntao / Real-ESRGAN

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Illegal hardware instruction

TornaxO7 opened this issue · comments

Hi! I'm getting the following error message if I execute sudo python setup.py develop:

WARNING: The wheel package is not available.
running develop
running egg_info
creating realesrgan.egg-info
writing realesrgan.egg-info/PKG-INFO
writing dependency_links to realesrgan.egg-info/dependency_links.txt
writing requirements to realesrgan.egg-info/requires.txt
writing top-level names to realesrgan.egg-info/top_level.txt
writing manifest file 'realesrgan.egg-info/SOURCES.txt'
reading manifest file 'realesrgan.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'realesrgan.egg-info/SOURCES.txt'
running build_ext
Creating /usr/lib/python3.9/site-packages/realesrgan.egg-link (link to .)
Adding realesrgan 0.2.2.5 to easy-install.pth file

Installed /home/tornax/Apps/Real-ESRGAN
Processing dependencies for realesrgan==0.2.2.5
Searching for tqdm
Reading https://pypi.org/simple/tqdm/
Downloading https://files.pythonhosted.org/packages/63/f3/b7a1b8e40fd1bd049a34566eb353527bb9b8e9b98f8b6cf803bb64d8ce95/tqdm-4.62.3-py2.py3-none-any.whl#sha256=8dd278a422499cd6b727e6ae4061c40b48fce8b76d1ccbf5d34fca9b7f925b0c
Best match: tqdm 4.62.3
Processing tqdm-4.62.3-py2.py3-none-any.whl
Installing tqdm-4.62.3-py2.py3-none-any.whl to /usr/lib/python3.9/site-packages
Adding tqdm 4.62.3 to easy-install.pth file
Installing tqdm script to /usr/bin

Installed /usr/lib/python3.9/site-packages/tqdm-4.62.3-py3.9.egg
Searching for torchvision
Reading https://pypi.org/simple/torchvision/
Downloading https://files.pythonhosted.org/packages/0e/e4/847aa282d07827b6a7cf8d06ac41d740101b7ee59ab96c5bdb03ff2fe0ad/torchvision-0.11.1-cp39-cp39-manylinux1_x86_64.whl#sha256=6ac7aa49f81cdab4176131c3004bc86a5e5525d0be430172c78e6e2bb604e675
Best match: torchvision 0.11.1
Processing torchvision-0.11.1-cp39-cp39-manylinux1_x86_64.whl
Installing torchvision-0.11.1-cp39-cp39-manylinux1_x86_64.whl to /usr/lib/python3.9/site-packages
Adding torchvision 0.11.1 to easy-install.pth file

Installed /usr/lib/python3.9/site-packages/torchvision-0.11.1-py3.9-linux-x86_64.egg
Searching for opencv-python
Reading https://pypi.org/simple/opencv-python/
Downloading https://files.pythonhosted.org/packages/57/22/ac3225692ce31ce4dc385a2026d03a3a49a40eedf05482d69d8f7de3e3d2/opencv_python-4.5.4.58-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl#sha256=bc34cdbfbab463750713118c8259a5d364547adab8ed91e94ba888349f33590a
Best match: opencv-python 4.5.4.58
Processing opencv_python-4.5.4.58-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Installing opencv_python-4.5.4.58-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl to /usr/lib/python3.9/site-packages
Adding opencv-python 4.5.4.58 to easy-install.pth file

Installed /usr/lib/python3.9/site-packages/opencv_python-4.5.4.58-py3.9-linux-x86_64.egg
Searching for gfpgan>=0.2.1
Reading https://pypi.org/simple/gfpgan/
Downloading https://files.pythonhosted.org/packages/fb/09/9ef642561e9da06a83bcb380377d2444e9bc372da538f66fa82511d10bab/gfpgan-0.2.3-py3-none-any.whl#sha256=689bbb0b2776fdeb6e60189920e8aa5ab09157b81af95504a361b4dbc40e3682
Best match: gfpgan 0.2.3
Processing gfpgan-0.2.3-py3-none-any.whl
Installing gfpgan-0.2.3-py3-none-any.whl to /usr/lib/python3.9/site-packages
Adding gfpgan 0.2.3 to easy-install.pth file

Installed /usr/lib/python3.9/site-packages/gfpgan-0.2.3-py3.9.egg
Searching for facexlib>=0.2.0.3
Reading https://pypi.org/simple/facexlib/
Downloading https://files.pythonhosted.org/packages/80/fa/d8530d1ba2c36f50cfb2b0196d90b181cf009e0cf1ad2a79613f3fc93821/facexlib-0.2.1.1-py3-none-any.whl#sha256=9e570844ccd7f5605fdf68c253ca571d5e0142626018d821722fa248dbb15a64
Best match: facexlib 0.2.1.1
Processing facexlib-0.2.1.1-py3-none-any.whl
Installing facexlib-0.2.1.1-py3-none-any.whl to /usr/lib/python3.9/site-packages
Adding facexlib 0.2.1.1 to easy-install.pth file

Installed /usr/lib/python3.9/site-packages/facexlib-0.2.1.1-py3.9.egg
Searching for basicsr>=1.3.3.11
Reading https://pypi.org/simple/basicsr/
Downloading https://files.pythonhosted.org/packages/b2/f0/4d3eea3001102c2d0d6b6eebb41160838d9b589ea5f9b4f74d1c03cdace2/basicsr-1.3.4.6.tar.gz#sha256=2433f9078f64b4c69d18081a48ce010d04e59f9c92c003fd0ca1c309c3ba72d9
Best match: basicsr 1.3.4.6
Processing basicsr-1.3.4.6.tar.gz
Writing /tmp/easy_install-kjdmogwp/basicsr-1.3.4.6/setup.cfg
Running basicsr-1.3.4.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-kjdmogwp/basicsr-1.3.4.6/egg-dist-tmp-ybeypbi2
[1]    32245 illegal hardware instruction  sudo python setup.py develop

How can I fix this?

I was just copy + pasting this block:

# Install basicsr - https://github.com/xinntao/BasicSR
# We use BasicSR for both training and inference
pip install basicsr
# facexlib and gfpgan are for face enhancement
pip install facexlib
pip install gfpgan
pip install -r requirements.txt
python setup.py develop

I added the sudo to python setup.py develop because I've got this error otherwise:

running develop
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/usr/lib/python3.9/site-packages/test-easy-install-32088.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/lib/python3.9/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://setuptools.readthedocs.io/en/latest/easy_install.html

Please make the appropriate changes for your system and try again.

It sounds like something wrong with your python in your OS.
You shouldn't use sudo for unknown code. Instead, you may use "pip3 install --user packagename" subcommand or python venv.
Also make sure you don't use python2_7

I don't have python2 on my machine.

You shouldn't use sudo for unknown code. Instead, you may use "pip3 install --user packagename" subcommand or python venv.
Also make sure you don't use python2_7

oh yes, you're right. It'd be probably nice to add this to the README :)

python setup.py develop

But how should I execute this without sudo?