Comments (12)
Good news! No more error on Ubuntu (server) 16.04.1 LTS + libvips 8.2.2-1 (without -dev) / ABI mode
$ pip install --upgrade --no-cache-dir git+git://github.com/jcupitt/pyvips.git@4df6fb5a7b50a6ba540c7fad529df7272c7efe51
Collecting git+git://github.com/jcupitt/pyvips.git@4df6fb5a7b50a6ba540c7fad529df7272c7efe51
Cloning git://github.com/jcupitt/pyvips.git (to 4df6fb5a7b50a6ba540c7fad529df7272c7efe51) to /tmp/pip-riwrh6b2-build
Could not find a tag or branch '4df6fb5a7b50a6ba540c7fad529df7272c7efe51', assuming commit.
Collecting cffi>=1.0.0 (from pyvips==2.1.2)
Downloading cffi-1.11.5-cp35-cp35m-manylinux1_x86_64.whl (420kB)
100% |████████████████████████████████| 430kB 91kB/s
Requirement already up-to-date: pycparser in ./.venv/lib/python3.5/site-packages (from cffi>=1.0.0->pyvips==2.1.2)
Installing collected packages: cffi, pyvips
Found existing installation: cffi 1.10.0
Uninstalling cffi-1.10.0:
Successfully uninstalled cffi-1.10.0
Found existing installation: pyvips 2.1.2
Uninstalling pyvips-2.1.2:
Successfully uninstalled pyvips-2.1.2
Running setup.py install for pyvips ... done
Successfully installed cffi-1.11.5 pyvips-2.1.2
$ pip show pyvips
Name: pyvips
Version: 2.1.2
Summary: binding for the libvips image processing library, ABI mode
...
$ python testvips.py
DEBUG:pyvips:Binary module load failed: No module named '_libvips'
DEBUG:pyvips:Falling back to ABI mode
DEBUG:pyvips:Loaded lib <cffi.api._make_ffi_library.<locals>.FFILibrary object at 0x7fe78636e5c0>
DEBUG:pyvips:Loaded lib <cffi.api._make_ffi_library.<locals>.FFILibrary object at 0x7fe786842eb8>
DEBUG:pyvips:Inited libvips
DEBUG:pyvips:
test Image
DEBUG:pyvips.voperation:VipsOperation.call: operation_name = VipsForeignLoadPng
DEBUG:pyvips.voperation:VipsOperation.call: string_options =
DEBUG:pyvips.voperation:VipsOperation.call: match_image = None
DEBUG:pyvips.vobject:VipsObject.set: name = filename, value = /REDACTED/pricedrop.png
DEBUG:pyvips.vobject:VipsObject.get: name = out
DEBUG:pyvips.vobject:VipsObject.get: name = width
DEBUG:pyvips.vobject:VipsObject.get: name = height
DEBUG:pyvips.vobject:VipsObject.get: name = format
DEBUG:pyvips.vobject:VipsObject.get: name = bands
DEBUG:pyvips.vobject:VipsObject.get: name = interpretation
DEBUG:pyvips.voperation:VipsOperation.call: result = <pyvips.Image 1812x859 uchar, 4 bands, srgb>
DEBUG:pyvips.vobject:VipsObject.get: name = width
DEBUG:pyvips.vobject:VipsObject.get: name = height
DEBUG:pyvips.vobject:VipsObject.get: name = format
DEBUG:pyvips.vobject:VipsObject.get: name = bands
DEBUG:pyvips.vobject:VipsObject.get: name = interpretation
image = <pyvips.Image 1812x859 uchar, 4 bands, srgb>
DEBUG:pyvips.vobject:VipsObject.get: name = width
image.width = 1812
I also re-checked the other platform just in case.
Ubuntu desktop 17.04, Python 3.5.3, libvips 8.4.5-1build1 (installed libvips, libvips-dev, libvips-tools)
- with dev headers installed, API mode --> OK
- after uninstalling the dev headers, ABI mode --> OK
from pyvips.
Huh strange, decls is just part of pyvips:
https://github.com/jcupitt/pyvips/blob/master/pyvips/decls.py
I'll try to investigate.
from pyvips.
If you have libvips-dev on there, it should work in API mode. Perhaps you have a cached binary wheel for pyvips? You could try deleting that and doing pip install pyvips
again.
from pyvips.
Also, which python are you using? It's currently passing with 2.7, 3.5 and 3.6, but failing with 3.3 and 3.4 due to a strange dependency problem.
https://travis-ci.org/jcupitt/pyvips/builds/345887526
from pyvips.
I'm using Python 3.5 on both machines, within a virtualenv.
Checking on your remark "Perhaps you have a cached binary wheel for pyvips", I ran:
$ pip install --no-cache-dir pyvips
Collecting pyvips
Downloading pyvips-2.1.1.tar.gz
Requirement already satisfied: cffi>=1.0.0 in ./.venv/lib/python3.5/site-packages (from pyvips)
Collecting pkgconfig (from pyvips)
Downloading pkgconfig-1.3.1.tar.gz
Requirement already satisfied: pycparser in ./.venv/lib/python3.5/site-packages (from cffi>=1.0.0->pyvips)
Installing collected packages: pkgconfig, pyvips
Running setup.py install for pkgconfig ... done
Running setup.py install for pyvips ... done
Successfully installed pkgconfig-1.3.1 pyvips-2.1.1
$ pip show pyvips
Name: pyvips
Version: 2.1.1
Summary: binding for the libvips image processing library, API mode
Home-page: https://github.com/jcupitt/pyvips
Author: John Cupitt
Author-email: [email protected]
License: MIT
Location: /data/work/storeprint/python/.venv/lib/python3.5/site-packages
Requires: cffi, pkgconfig
This time it seems to report being installed in API mode rather than ABI.
However, this still doesn't help running the sample code (though the error seems a bit different this time):
$ python testpyvips.py
DEBUG:pyvips:Binary module load failed: /REDACTED/.venv/lib/python3.5/site-packages/_libvips.abi3.so: undefined symbol: vips_image_get_fields
DEBUG:pyvips:Falling back to ABI mode
DEBUG:pyvips:Loaded lib <cffi.api._make_ffi_library.<locals>.FFILibrary object at 0x7f5f99d7f128>
DEBUG:pyvips:Loaded lib <cffi.api._make_ffi_library.<locals>.FFILibrary object at 0x7f5f9a24cfd0>
DEBUG:pyvips:Inited libvips
DEBUG:pyvips:
Traceback (most recent call last):
File "testpyvips.py", line 4, in <module>
import pyvips
File "/REDACTED/.venv/lib/python3.5/site-packages/pyvips/__init__.py", line 75, in <module>
import decls
ImportError: No module named 'decls'
Could it be related to the virtualenv? or to the fact I used "--no-install-recommends" for the libraries (sudo apt-get install libvips libvips-dev libvips-tools --no-install-recommends
)?
from pyvips.
Hello again, you've hit another bug, sorry:
https://github.com/jcupitt/pyvips/issues/33
Could you try git master pyvips? That one should be fixed now.
pyvips 2.1 has a big change to the way it installs :-( it seems to be causing trouble.
from pyvips.
Oop, I was reading too quickly, that's a different problem.
I'll have another look at your decls
issue.
from pyvips.
By the way here are my libvips versions:
- Ubuntu 16.04.1 LTS, Python 3.5.2 --> libvips 8.2.2-1
- Ubuntu desktop 17.04, Python 3.5.3 --> libvips 8.4.5-1build1 (installed libvips, libvips-dev, libvips-tools)
Doing the test on the latter (with libvips 8.4.5-1build1), using the most recent commit on master:
$ pip install --no-cache-dir git+git://github.com/jcupitt/pyvips.git@2bcaf01dbed6e7df117be1a004664e918827ee82
Collecting git+git://github.com/jcupitt/pyvips.git@2bcaf01dbed6e7df117be1a004664e918827ee82
Cloning git://github.com/jcupitt/pyvips.git (to 2bcaf01dbed6e7df117be1a004664e918827ee82) to /tmp/pip-do7k84bu-build
Could not find a tag or branch '2bcaf01dbed6e7df117be1a004664e918827ee82', assuming commit.
Requirement already satisfied: cffi>=1.0.0 in ./.venv/lib/python3.5/site-packages (from pyvips==2.1.2)
Requirement already satisfied: pkgconfig in ./.venv/lib/python3.5/site-packages (from pyvips==2.1.2)
Requirement already satisfied: pycparser in ./.venv/lib/python3.5/site-packages (from cffi>=1.0.0->pyvips==2.1.2)
Installing collected packages: pyvips
Found existing installation: pyvips 2.1.1
Uninstalling pyvips-2.1.1:
Successfully uninstalled pyvips-2.1.1
Running setup.py install for pyvips ... done
Successfully installed pyvips-2.1.2
$ pip show pyvips
Name: pyvips
Version: 2.1.2
Summary: binding for the libvips image processing library, API mode
...
Now, it works! No more decls
issue.
DEBUG:pyvips:Loaded binary module _libvips
DEBUG:pyvips:Inited libvips
DEBUG:pyvips:
test Image
DEBUG:pyvips.voperation:VipsOperation.call: operation_name = VipsForeignLoadPng
DEBUG:pyvips.voperation:VipsOperation.call: string_options =
DEBUG:pyvips.voperation:VipsOperation.call: match_image = None
DEBUG:pyvips.vobject:VipsObject.set: name = filename, value = /REDACTED.png
DEBUG:pyvips.vobject:VipsObject.get: name = out
DEBUG:pyvips.vobject:VipsObject.get: name = width
DEBUG:pyvips.vobject:VipsObject.get: name = height
DEBUG:pyvips.vobject:VipsObject.get: name = format
DEBUG:pyvips.vobject:VipsObject.get: name = bands
DEBUG:pyvips.vobject:VipsObject.get: name = interpretation
DEBUG:pyvips.voperation:VipsOperation.call: result = <pyvips.Image 1812x859 uchar, 4 bands, srgb>
DEBUG:pyvips.vobject:VipsObject.get: name = width
DEBUG:pyvips.vobject:VipsObject.get: name = height
DEBUG:pyvips.vobject:VipsObject.get: name = format
DEBUG:pyvips.vobject:VipsObject.get: name = bands
DEBUG:pyvips.vobject:VipsObject.get: name = interpretation
image = <pyvips.Image 1812x859 uchar, 4 bands, srgb>
DEBUG:pyvips.vobject:VipsObject.get: name = width
image.width = 1812
from pyvips.
Testing on my other platform: Ubuntu (server) 16.04.1 LTS, Python 3.5.2 --> libvips 8.2.2-1.
On that one I only installed libvips (not -dev) so I'd expect it to use ABI
Installing the same version
$ pip install --no-cache-dir git+git://github.com/jcupitt/pyvips.git@2bcaf01dbed6e7df117be1a004664e918827ee82
Collecting git+git://github.com/jcupitt/pyvips.git@2bcaf01dbed6e7df117be1a004664e918827ee82
Cloning git://github.com/jcupitt/pyvips.git (to 2bcaf01dbed6e7df117be1a004664e918827ee82) to /tmp/pip-vrkoekaa-build
Could not find a tag or branch '2bcaf01dbed6e7df117be1a004664e918827ee82', assuming commit.
Requirement already satisfied: cffi>=1.0.0 in ./.venv/lib/python3.5/site-packages (from pyvips==2.1.2)
Requirement already satisfied: pycparser in ./.venv/lib/python3.5/site-packages (from cffi>=1.0.0->pyvips==2.1.2)
Installing collected packages: pyvips
Found existing installation: pyvips 2.1.1
Uninstalling pyvips-2.1.1:
Successfully uninstalled pyvips-2.1.1
Running setup.py install for pyvips ... done
Successfully installed pyvips-2.1.2
$ pip show pyvips
Name: pyvips
Version: 2.1.2
Summary: binding for the libvips image processing library, ABI mode
...
Now the test...
$ python testvips.py
DEBUG:pyvips:Binary module load failed: No module named '_libvips'
DEBUG:pyvips:Falling back to ABI mode
DEBUG:pyvips:Loaded lib <cffi.api._make_ffi_library.<locals>.FFILibrary object at 0x7f4e25ad22e8>
DEBUG:pyvips:Loaded lib <cffi.api._make_ffi_library.<locals>.FFILibrary object at 0x7f4e25b33f28>
DEBUG:pyvips:Inited libvips
DEBUG:pyvips:
Traceback (most recent call last):
File "testvips.py", line 4, in <module>
import pyvips
File "/REDACTED/.venv/lib/python3.5/site-packages/pyvips/__init__.py", line 75, in <module>
import decls
ImportError: No module named 'decls'
So the "decls" issue still seems to be happening under these conditions:
- Ubuntu (server) 16.04.1 LTS
- Python 3.5.2
- libvips 8.2.2-1 (and without -dev)
- pyvips master@2bcaf01dbed6e7df117be1a004664e918827ee82
from pyvips.
Some progress! Thank you for being so patient with this.
Could you try master again? I made decls a relative import, perhaps it'll help.
from pyvips.
Oh dear, that was silly. Try again, it's working for me now.
from pyvips.
Great! I'll merge your PR too. Thank you again for reporting this.
from pyvips.
Related Issues (20)
- Pyvips fetch returns bad image on .svs files HOT 4
- Reading in image a second time breaks on qptiff file HOT 6
- Documentation link to conda package HOT 1
- Create svs file with image pyramid, label and macro in pyvips? HOT 4
- Image merge stitch HOT 2
- `addalpha` has different behaviour compared to C HOT 1
- Error installing pyvips on Mac OS HOT 15
- draw_rect fill error HOT 2
- creating tiles of 16bit multiband (4 band) tiff image leaves black canvas HOT 4
- class "jxlsave" not found HOT 9
- Assertion failed: sp->cinfo.comm.is_decompressor HOT 3
- Help installing pyvips for jupyter HOT 5
- `TIFFFillTile: Read error` when writing a TIFF file on a per-tile basis. HOT 2
- Thumbnail creation taking too long HOT 2
- Unable to save images when certain combinations of them are resize()'d HOT 7
- pyvips stats HOT 1
- How does composite() merge colors? HOT 8
- ICC profiles from file stream in pyvips HOT 5
- Why is error 0x7f? HOT 1
- Can libvips' stack size be modified using pyvips? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvips.