question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to install pyvips on Ubuntu 21.04 (python3.9.2)

See original GitHub issue
$ pip install --user pyvips
Collecting pyvips
  Using cached pyvips-2.1.14.tar.gz (43 kB)
Requirement already satisfied: cffi>=1.0.0 in ./.pyenv/versions/3.9.2/lib/python3.9/site-packages (from pyvips) (1.14.5)
Requirement already satisfied: pkgconfig in ./.pyenv/versions/3.9.2/lib/python3.9/site-packages (from pyvips) (1.5.2)
Requirement already satisfied: pycparser in ./.pyenv/versions/3.9.2/lib/python3.9/site-packages (from cffi>=1.0.0->pyvips) (2.20)
Using legacy 'setup.py install' for pyvips, since package 'wheel' is not installed.
Installing collected packages: pyvips
    Running setup.py install for pyvips ... error
    ERROR: Command errored out with exit status 1:
     command: /home/andre/.pyenv/versions/3.9.2/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vxajqvu2/pyvips_e87d92d5a23a4be6ae27eaad8e0125c0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vxajqvu2/pyvips_e87d92d5a23a4be6ae27eaad8e0125c0/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-wnp4pb9_/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/andre/.local/include/python3.9/pyvips
         cwd: /tmp/pip-install-vxajqvu2/pyvips_e87d92d5a23a4be6ae27eaad8e0125c0/
    Complete output (37 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    creating build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/gobject.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/vtarget.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/error.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/vconnection.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/vobject.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/vtargetcustom.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/vinterpolate.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/gvalue.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/voperation.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/enums.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/vsourcecustom.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/version.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/pyvips_build.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/__init__.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/vsource.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/base.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/vimage.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/vregion.py -> build/lib.linux-x86_64-3.9/pyvips
    copying pyvips/vdecls.py -> build/lib.linux-x86_64-3.9/pyvips
    running build_ext
    generating cffi module 'build/temp.linux-x86_64-3.9/_libvips.c'
    creating build/temp.linux-x86_64-3.9
    building '_libvips' extension
    creating build/temp.linux-x86_64-3.9/build
    creating build/temp.linux-x86_64-3.9/build/temp.linux-x86_64-3.9
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/orc-0.4 -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/x86_64-linux-gnu -I/home/andre/.pyenv/versions/3.9.2/include/python3.9 -c build/temp.linux-x86_64-3.9/_libvips.c -o build/temp.linux-x86_64-3.9/build/temp.linux-x86_64-3.9/_libvips.o
    build/temp.linux-x86_64-3.9/_libvips.c:570:18: fatal error: vips/vips.h: No such file or directory
      570 |         #include <vips/vips.h>
          |                  ^~~~~~~~~~~~~
    compilation terminated.
    error: command '/usr/lib/ccache/gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/andre/.pyenv/versions/3.9.2/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vxajqvu2/pyvips_e87d92d5a23a4be6ae27eaad8e0125c0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vxajqvu2/pyvips_e87d92d5a23a4be6ae27eaad8e0125c0/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-wnp4pb9_/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/andre/.local/include/python3.9/pyvips Check the logs for full command output.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AndKecommented, Apr 24, 2021

This was because I needed “libvips-dev” Please handle this error more gracefully, and make the installation suggest all required dependencies: apt install libvips libvips-dev

0reactions
AndKecommented, Apr 25, 2021

who knows 😃 - all I know is that I used a current release of pyvips for a project I currently work on before the distro upgrade, and got the error after. Thank you for looking into this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pyvips - PyPI
Non-conda install. First, you need the libvips shared library on your library search path, version 8.2 or later, though at least version 8.9...
Read more >
pyvips - Bountysource
Unable to install pyvips on Ubuntu 21.04 (python3.9.2) $ 0 ... Created 1 year ago in libvips/pyvips with 2 comments. $ pip install...
Read more >
Not able to use libvips / pyvips - Datalore Forum
I need to use “pyvips” in my python code and it depends on the libvips-tools package. I have tried the script shown below...
Read more >
Cannot install python venv on Ubuntu 20.04 after upgrading ...
I can't install python3.8-venv package, because of a newer version of python3.8 package (with ~20.04 postfix). It turned out that I hadn't ...
Read more >
Compare Packages Between Distributions - DistroWatch.com
Often times it is useful to be able to compare the versions of different packages ... arch-install-scripts-28-1.1.src.rpm ... barcode-0.99-9.2.src.rpm
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found