Why doesn't gir1.2-vips-8.0 contain Vips.Image.grey?

When installed via pyvips into a venv Vips.Image.grey is working but with gir1.2-vips-8.0 this code fails because grey is not found:

import gi
gi.require_version('Vips', '8.0')
from gi.repository import Vips

null_image = Vips.Image.grey(1, 1)

Edit: I specifically want to avoid using pyvips because it’s the only dependency for the script I’m running and I want to not bother about activating venv.

Ask Ubuntu Asked by int_ua on January 2, 2021

2 Answers

2 Answers

You seem to be using the old gobject-introspection Python interface. It was slow, unstable and inflexible. It will give you poor performance and frequent, inexplicable crashes.

It was replaced quite a few years ago by the much better pyvips. Just pip install pyvips, then:

import pyvips
image = pyvips.Image.grey(100, 100)

Answered by jcupitt on January 2, 2021

Because the grey is not a direct dependency of libvips or libvips42 which is in turn a dependency package gir1.2-vips-8.0.

On the other hand, if you install it via pip in an venv it is being pulled by python as a dependency.

Answered by Ron on January 2, 2021

Add your own answers!

Related Questions

Ubuntu emulator not boot up with fglrx

0  Asked on October 31, 2021 by inglebard


Unable to process upgrades due to error with snmpd

1  Asked on October 31, 2021 by malchesador


apache2 welcome page not showing

1  Asked on October 31, 2021


command ‘go’ not found

5  Asked on October 31, 2021


a2dp-sink profile connect failed

5  Asked on October 31, 2021 by keddad


Only “Dummy output” (sound) in Ubuntu 20.04 after reboot – Broken driver / module

8  Asked on October 31, 2021 by sancho-s-reinstatemonicacellio


arrow/exclamation symbol on top bar

1  Asked on October 31, 2021


Samsung printer m2070 no working on ubuntu

1  Asked on October 31, 2021 by vladimir-usora


Wine in Ubuntu cannot create temporary directory error?

0  Asked on October 31, 2021 by aman-grover


Malformed security header

1  Asked on October 31, 2021 by mh-shuvo


Evince shows small frame in Presentation mode

2  Asked on October 31, 2021 by popoolmica


Keyboard Stops working after flashing not allowed sign

0  Asked on October 31, 2021 by piyush-sharma


Can’t get 4k @ 60hz, only 30hz

2  Asked on October 31, 2021 by tumdum


Clamav – OnAccessMountPath & OnAccessPrevention

0  Asked on October 31, 2021 by polik989


Ask a Question

Get help from others!

© 2022 All rights reserved.