Giter VIP home page Giter VIP logo

Comments (20)

jcupitt avatar jcupitt commented on July 19, 2024

Hello, it's finding libvips, it's not finding _libvips.so, which is the name Python cffi uses for the module it generates at install time.

You'd need to investigate your pip install to see what's going wrong there. On Ubuntu 18.04 I see:

john@kiwi:~$ rm -rf ~/.local
john@kiwi:~$ which pip
/usr/bin/pip
john@kiwi:~$ pip --version
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
john@kiwi:~$ pip install pyvips --user --verbose
Collecting pyvips
  1 location(s) to search for versions of pyvips:
  * https://pypi.python.org/simple/pyvips/
... collects and install dependencies
Building wheels for collected packages: pyvips
  Running setup.py bdist_wheel for pyvips ...   Destination directory: /tmp/tmpwQUUPCpip-wheel-
... collects parts
  running build_ext
  generating cffi module 'build/temp.linux-x86_64-2.7/_libvips.c'
  creating build/temp.linux-x86_64-2.7
  building '_libvips' extension
  creating build/temp.linux-x86_64-2.7/build
  creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
... compiles wrapper
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.linux-x86_64
  creating build/bdist.linux-x86_64/wheel
  creating build/bdist.linux-x86_64/wheel/pyvips
... copies parts
  copying build/lib.linux-x86_64-2.7/_libvips.so -> build/bdist.linux-x86_64/wheel
... cleaning up

Then:

john@kiwi:~$ python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> logging.basicConfig(level = logging.DEBUG)
>>> import pyvips
DEBUG:pyvips:Loaded binary module _libvips
DEBUG:pyvips:Inited libvips
>>> 

from pyvips.

jramapuram avatar jramapuram commented on July 19, 2024

@jcupitt : Gotcha; I don't see _libvips.so or the build_ext step. See below (note I am running anaconda w/ python 3.6)

-bash-4.1$ pip install --no-cache-dir pyvips --verbose
Created temporary directory: /tmp/pip-ephem-wheel-cache-0ghm9m7r
Created temporary directory: /tmp/pip-req-tracker-u9bikuwt
Created requirements tracker '/tmp/pip-req-tracker-u9bikuwt'
Created temporary directory: /tmp/pip-install-944gr4c7
Collecting pyvips
  1 location(s) to search for versions of pyvips:
  * https://pypi.org/simple/pyvips/
  Getting page https://pypi.org/simple/pyvips/
  Starting new HTTPS connection (1): pypi.org:443
  https://pypi.org:443 "GET /simple/pyvips/ HTTP/1.1" 200 1211
  Analyzing links from page https://pypi.org/simple/pyvips/
    Found link https://files.pythonhosted.org/packages/6a/2d/5ca1ee5077f733335c208b7a3f3d62f964aaab87731ab3e2850e404df7f1/pyvips-2.0.0-py2.py3-none-any.whl#sha256=c99590364cfc620af0db004aa9c6e6830a3c337d0db074d0a61da74dd4b91071 (from https://pypi.org/simple/pyvips/), version: 2.0.0
    Found link https://files.pythonhosted.org/packages/40/99/2d9991eff005de6674f155808423e8aac934ba50b5c8858abef5e148c51f/pyvips-2.0.1-py2.py3-none-any.whl#sha256=bf74b25a91bed8d9a96be8d457ce26ee487bf8b72c48f2c56aa643e233e341b2 (from https://pypi.org/simple/pyvips/), version: 2.0.1
    Found link https://files.pythonhosted.org/packages/b6/3a/261808544f6832f6e00b6ee26435210d6293cc022b9c51e2b48543575dc5/pyvips-2.0.2-py2.py3-none-any.whl#sha256=e6a6541672c6eab62ab8442738742b021c624a7b51b49c1ba9ab9aa99935692f (from https://pypi.org/simple/pyvips/), version: 2.0.2
    Found link https://files.pythonhosted.org/packages/62/32/bd01d86b81fdd84c0699cda1c40b0334f63e4deb981d22f468b3ef681513/pyvips-2.0.3-py2.py3-none-any.whl#sha256=0939c390af4584d2a48d488630f0f249d234e6087b188f7e8a70418479b66488 (from https://pypi.org/simple/pyvips/), version: 2.0.3
    Found link https://files.pythonhosted.org/packages/47/1f/a646ed24baab8404d7ce485e088bd58ec2ec4e9108089dffa6acf42b6347/pyvips-2.0.4-py2.py3-none-any.whl#sha256=f1b502e20d3b12abf295a2eb57387061b3285b6f93a228a1c0beada01a2e435d (from https://pypi.org/simple/pyvips/), version: 2.0.4
    Found link https://files.pythonhosted.org/packages/17/08/9314ee0082c56aeac9dbbc23f5948e1e884ac9679cf6032197d5be34fa56/pyvips-2.0.5-py2.py3-none-any.whl#sha256=684a459452b1b1968c7c8dbd636cdb669f780e9927291dc469a25c751e9337be (from https://pypi.org/simple/pyvips/), version: 2.0.5
    Found link https://files.pythonhosted.org/packages/b5/74/5c963d0dcc76fb467902e18aab55500158f5c9acdc86235061a878c16376/pyvips-2.1.0-py2.py3-none-any.whl#sha256=eec805bba1de3bcaedf855a5696c85ca550896785e1fdf96ef7021248850b618 (from https://pypi.org/simple/pyvips/), version: 2.1.0
    Found link https://files.pythonhosted.org/packages/a0/32/f819aa0de7394b4d714fece744bde53ee82df5e545e4c5affb17563bdfcd/pyvips-2.1.0.tar.gz#sha256=4196e80ef03ca7efff21f00866e1302c5e90d45a8d9d87f3e5b122a1ba04ced2 (from https://pypi.org/simple/pyvips/), version: 2.1.0
    Found link https://files.pythonhosted.org/packages/c2/42/dbb88d6049ec0cdd5aa62070019d50a9381cb390dd5e68ab3c062b0a5260/pyvips-2.1.1.tar.gz#sha256=034210a7bfdbe574e07f71c96ca8cca3cc6072a5460032dad2794d8e75bd43dc (from https://pypi.org/simple/pyvips/), version: 2.1.1
    Found link https://files.pythonhosted.org/packages/5c/6e/df4a34a9c8b349e40d6400bd4ac40558b3497732795fa0399596155b18b1/pyvips-2.1.2.tar.gz#sha256=c9de58aa073194e85ea0b8e90cb6b6a22905293c5c53d030424bec40dbe281ad (from https://pypi.org/simple/pyvips/), version: 2.1.2
    Found link https://files.pythonhosted.org/packages/60/fb/820d471aa27cea5c11e752579cf11308adcfbd18558f509e7a7a5d7f229b/pyvips-2.1.3.tar.gz#sha256=223bb78753866c604a9918d89b53b5dd7b6102c5302c6672f0c4cb047c4c15f2 (from https://pypi.org/simple/pyvips/), version: 2.1.3
  Using version 2.1.3 (newest of versions: 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.1.0, 2.1.1, 2.1.2, 2.1.3)
  Created temporary directory: /tmp/pip-unpack-cth3nfrp
  Starting new HTTPS connection (1): files.pythonhosted.org:443
  https://files.pythonhosted.org:443 "GET /packages/60/fb/820d471aa27cea5c11e752579cf11308adcfbd18558f509e7a7a5d7f229b/pyvips-2.1.3.tar.gz HTTP/1.1" 200 29358
  Downloading https://files.pythonhosted.org/packages/60/fb/820d471aa27cea5c11e752579cf11308adcfbd18558f509e7a7a5d7f229b/pyvips-2.1.3.tar.gz
  Downloading from URL https://files.pythonhosted.org/packages/60/fb/820d471aa27cea5c11e752579cf11308adcfbd18558f509e7a7a5d7f229b/pyvips-2.1.3.tar.gz#sha256=223bb78753866c604a9918d89b53b5dd7b6102c5302c6672f0c4cb047c4c15f2 (from https://pypi.org/simple/pyvips/)
  Added pyvips from https://files.pythonhosted.org/packages/60/fb/820d471aa27cea5c11e752579cf11308adcfbd18558f509e7a7a5d7f229b/pyvips-2.1.3.tar.gz#sha256=223bb78753866c604a9918d89b53b5dd7b6102c5302c6672f0c4cb047c4c15f2 to build tracker '/tmp/pip-req-tracker-u9bikuwt'
  Running setup.py (path:/tmp/pip-install-944gr4c7/pyvips/setup.py) egg_info for package pyvips
    Running command python setup.py egg_info
    zip_safe flag not set; analyzing archive contents...

    Installed /tmp/pip-install-944gr4c7/pyvips/.eggs/pkgconfig-1.3.1-py3.6.egg
    Searching for pytest-runner
    Reading https://pypi.python.org/simple/pytest-runner/
    Downloading https://files.pythonhosted.org/packages/72/a4/d7a5738a3096f22a98bec1609e237b250ebff04e5ea2930305d485337263/pytest_runner-4.2-py2.py3-none-any.whl#sha256=d987fec1e31287592ffe1cb823a8c613c533db4c6aaca0ee1191dbc91e2fcc61
    Best match: pytest-runner 4.2
    Processing pytest_runner-4.2-py2.py3-none-any.whl
    Installing pytest_runner-4.2-py2.py3-none-any.whl to /tmp/pip-install-944gr4c7/pyvips/.eggs
    writing requirements to /tmp/pip-install-944gr4c7/pyvips/.eggs/pytest_runner-4.2-py3.6.egg/EGG-INFO/requires.txt

    Installed /tmp/pip-install-944gr4c7/pyvips/.eggs/pytest_runner-4.2-py3.6.egg
    running egg_info
    creating pip-egg-info/pyvips.egg-info
    writing pip-egg-info/pyvips.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/pyvips.egg-info/dependency_links.txt
    writing requirements to pip-egg-info/pyvips.egg-info/requires.txt
    writing top-level names to pip-egg-info/pyvips.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/pyvips.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/pyvips.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/pyvips.egg-info/SOURCES.txt'
  Source in /tmp/pip-install-944gr4c7/pyvips has version 2.1.3, which satisfies requirement pyvips from https://files.pythonhosted.org/packages/60/fb/820d471aa27cea5c11e752579cf11308adcfbd18558f509e7a7a5d7f229b/pyvips-2.1.3.tar.gz#sha256=223bb78753866c604a9918d89b53b5dd7b6102c5302c6672f0c4cb047c4c15f2
  Removed pyvips from https://files.pythonhosted.org/packages/60/fb/820d471aa27cea5c11e752579cf11308adcfbd18558f509e7a7a5d7f229b/pyvips-2.1.3.tar.gz#sha256=223bb78753866c604a9918d89b53b5dd7b6102c5302c6672f0c4cb047c4c15f2 from build tracker '/tmp/pip-req-tracker-u9bikuwt'
Requirement already satisfied: cffi>=1.0.0 in ./.venv3/lib/python3.6/site-packages (from pyvips) (1.11.4)
Requirement already satisfied: pycparser in ./.venv3/lib/python3.6/site-packages (from cffi>=1.0.0->pyvips) (2.18)
Installing collected packages: pyvips
  Created temporary directory: /tmp/pip-record-yb1w3j2a
  Running setup.py install for pyvips ...     Running command /home/ramapur0/.venv3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-944gr4c7/pyvips/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-yb1w3j2a/install-record.txt --single-version-externally-managed --compile
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/pyvips
    copying pyvips/base.py -> build/lib/pyvips
    copying pyvips/vimage.py -> build/lib/pyvips
    copying pyvips/vinterpolate.py -> build/lib/pyvips
    copying pyvips/voperation.py -> build/lib/pyvips
    copying pyvips/vobject.py -> build/lib/pyvips
    copying pyvips/enums.py -> build/lib/pyvips
    copying pyvips/gobject.py -> build/lib/pyvips
    copying pyvips/gvalue.py -> build/lib/pyvips
    copying pyvips/__init__.py -> build/lib/pyvips
    copying pyvips/version.py -> build/lib/pyvips
    copying pyvips/decls.py -> build/lib/pyvips
    copying pyvips/pyvips_build.py -> build/lib/pyvips
    copying pyvips/error.py -> build/lib/pyvips
    running install_lib
    creating /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/base.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/vimage.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/vinterpolate.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/voperation.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/vobject.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/enums.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/gobject.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/gvalue.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/__init__.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/version.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/decls.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/pyvips_build.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    copying build/lib/pyvips/error.py -> /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/base.py to base.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/vimage.py to vimage.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/vinterpolate.py to vinterpolate.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/voperation.py to voperation.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/vobject.py to vobject.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/enums.py to enums.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/gobject.py to gobject.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/gvalue.py to gvalue.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/__init__.py to __init__.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/version.py to version.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/decls.py to decls.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/pyvips_build.py to pyvips_build.cpython-36.pyc
    byte-compiling /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips/error.py to error.cpython-36.pyc
    running install_egg_info
    running egg_info
    writing pyvips.egg-info/PKG-INFO
    writing dependency_links to pyvips.egg-info/dependency_links.txt
    writing requirements to pyvips.egg-info/requires.txt
    writing top-level names to pyvips.egg-info/top_level.txt
    reading manifest file 'pyvips.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pyvips.egg-info/SOURCES.txt'
    Copying pyvips.egg-info to /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips-2.1.3-py3.6.egg-info
    running install_scripts
    writing list of installed files to '/tmp/pip-record-yb1w3j2a/install-record.txt'
done
  Removing source in /tmp/pip-install-944gr4c7/pyvips
Successfully installed pyvips-2.1.3

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Ah OK. Anaconda can't install pip packages with binary components. You need to make a special anaconda package.

A few people have had a go, but I don't think anyone's managed it yet.

from pyvips.

jramapuram avatar jramapuram commented on July 19, 2024

I'm not using conda here: just pip. After an anaconda installation you can use pip normally as if it were a base system install.

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

... my understanding is that anaconda packages include all the binary components so they can install on platforms like Windows with no standard compiler.

This means you can't compile at install time, so packages which include C (pyvips has no C, but it will use cffi to generate C at install time) won't work.

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Oh, well try with the platform python. If that fixes it, you've hit an anaconda problem.

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

pyvips will still work in ABI mode, it's just a little slower, so you might be able to just do nothing.

from pyvips.

jramapuram avatar jramapuram commented on July 19, 2024

Will give it a shot and report back; the way I see anaconda is just a virtualenv + helpers to pull binaries. So for example if I do :

conda install matplotlib

it pulls the correct dependencies for matplotlib and then installs matplotlib itself via pip.

Now, the virtualenv part of conda installs pip for you: this should be the same as a normal virtualenv pip. However, I will give it a shot anyhow.

from pyvips.

jramapuram avatar jramapuram commented on July 19, 2024

Btw, here is the build from source:

-bash-4.1$ python setup.py bdist_wheel
running bdist_wheel
running build
running build_py
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/decls.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/gobject.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/base.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/__init__.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/error.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/vobject.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/enums.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/gvalue.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/version.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/voperation.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/vimage.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/vinterpolate.py -> build/bdist.linux-x86_64/wheel/pyvips
copying build/lib/pyvips/pyvips_build.py -> build/bdist.linux-x86_64/wheel/pyvips
running install_egg_info
running egg_info
writing pyvips.egg-info/PKG-INFO
writing dependency_links to pyvips.egg-info/dependency_links.txt
writing requirements to pyvips.egg-info/requires.txt
writing top-level names to pyvips.egg-info/top_level.txt
reading manifest file 'pyvips.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pyvips.egg-info/SOURCES.txt'
Copying pyvips.egg-info to build/bdist.linux-x86_64/wheel/pyvips-2.1.3-py3.6.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/pyvips-2.1.3.dist-info/WHEEL
creating '/home/ramapur0/pyvips/dist/pyvips-2.1.3-py2.py3-none-any.whl' and adding '.' to it
adding 'pyvips/__init__.py'
adding 'pyvips/base.py'
adding 'pyvips/decls.py'
adding 'pyvips/enums.py'
adding 'pyvips/error.py'
adding 'pyvips/gobject.py'
adding 'pyvips/gvalue.py'
adding 'pyvips/pyvips_build.py'
adding 'pyvips/version.py'
adding 'pyvips/vimage.py'
adding 'pyvips/vinterpolate.py'
adding 'pyvips/vobject.py'
adding 'pyvips/voperation.py'
adding 'pyvips-2.1.3.dist-info/DESCRIPTION.rst'
adding 'pyvips-2.1.3.dist-info/metadata.json'
adding 'pyvips-2.1.3.dist-info/top_level.txt'
adding 'pyvips-2.1.3.dist-info/WHEEL'
adding 'pyvips-2.1.3.dist-info/METADATA'
adding 'pyvips-2.1.3.dist-info/RECORD'
-bash-4.1$ find . -name _libvips.so
-bash-4.1$ find . -name *.so
-bash-4.1$ find . -name \*.so
-bash-4.1$ 

Here is the same but install instead of bdist_wheel:

-bash-4.1$ python setup.py install
running install
running bdist_egg
running egg_info
writing pyvips.egg-info/PKG-INFO
writing dependency_links to pyvips.egg-info/dependency_links.txt
writing requirements to pyvips.egg-info/requires.txt
writing top-level names to pyvips.egg-info/top_level.txt
reading manifest file 'pyvips.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pyvips.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/decls.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/gobject.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/base.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/__init__.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/error.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/vobject.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/enums.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/gvalue.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/version.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/voperation.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/vimage.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/vinterpolate.py -> build/bdist.linux-x86_64/egg/pyvips
copying build/lib/pyvips/pyvips_build.py -> build/bdist.linux-x86_64/egg/pyvips
byte-compiling build/bdist.linux-x86_64/egg/pyvips/decls.py to decls.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/gobject.py to gobject.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/base.py to base.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/error.py to error.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/vobject.py to vobject.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/enums.py to enums.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/gvalue.py to gvalue.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/version.py to version.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/voperation.py to voperation.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/vimage.py to vimage.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/vinterpolate.py to vinterpolate.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyvips/pyvips_build.py to pyvips_build.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying pyvips.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyvips.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyvips.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyvips.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyvips.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/pyvips-2.1.3-py3.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pyvips-2.1.3-py3.6.egg
Copying pyvips-2.1.3-py3.6.egg to /home/ramapur0/.venv3/lib/python3.6/site-packages
Adding pyvips 2.1.3 to easy-install.pth file

Installed /home/ramapur0/.venv3/lib/python3.6/site-packages/pyvips-2.1.3-py3.6.egg
Processing dependencies for pyvips==2.1.3
Searching for cffi==1.11.4
Best match: cffi 1.11.4
Adding cffi 1.11.4 to easy-install.pth file

Using /home/ramapur0/.venv3/lib/python3.6/site-packages
Searching for pycparser==2.18
Best match: pycparser 2.18
Adding pycparser 2.18 to easy-install.pth file

Using /home/ramapur0/.venv3/lib/python3.6/site-packages
Finished processing dependencies for pyvips==2.1.3

from pyvips.

jramapuram avatar jramapuram commented on July 19, 2024

Both don't produce _libvips.so :

-bash-4.1$ find ~/.venv3 -name *.so | grep vips
-bash-4.1$

I'm trying to shave every ms from my image pipeline and 20% is quite a bit that I would like to avoid if possible!

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Anaconda runs its own Python binary, not the system one, and it does not include any of the development headers. This means you can't build modules which will load into Anaconda's python, because the compiler simply can't run.

Anaconda is great on platforms like Windows (where it started) since the lack of a standard package manager means regular Python is very, very difficult to use with binary modules.

It causes problems on non-Windows platforms, since Anaconda has its own package format. You have to make a conda package which builds not just pyvips, but libvips and all dependencies as well.

from pyvips.

jramapuram avatar jramapuram commented on July 19, 2024

Hmm, is there some flag that toggles building? I'm just curious why build_ext isn't called.

I build pytorch consistently from scratch to install into conda.
It uses nvcc, gcc-5 and a whole boatload of system headers.

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Sorry, I think there's something messed up with your python install. What platform are you using?

With Ubuntu 18.04 platform python 3.6:

john@kiwi:~$ rm -rf .local
john@kiwi:~$ pip3 install pyvips --user --verbose
.... lots of stuff
john@kiwi:~$ python3
Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> logging.basicConfig(level = logging.DEBUG)
>>> import pyvips
DEBUG:pyvips:Loaded binary module _libvips
DEBUG:pyvips:Inited libvips

Full log here: https://gist.github.com/jcupitt/394d0818f06641e699ef069858c6667e

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Of course the 20% is on function dispatch, not image processing. You'll see a speedup if you're doing lots of small images, but almost no speedup if you're doing a few big images.

from pyvips.

jramapuram avatar jramapuram commented on July 19, 2024

Ok looks like you are right; I circumvented this issue by :

  1. setup a virtualenv3
  2. build pyvips in that virtualenv : here we have build_ext taking place
  3. build a whl using bdist_wheel
  4. install that wheel into the conda install
  5. profit
In [1]: import logging
   ...: logging.basicConfig(level = logging.DEBUG)
   ...: import pyvips
   ...: 
DEBUG:pyvips:Loaded binary module _libvips
DEBUG:pyvips:Inited libvips

If this is possible I'm guessing there is something preventing build_ext from being triggered and if that function could be called then it should work in either case: i.e. anaconda or pip (virtualenv / host version)

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Sorry, you're much more expert on this than me. Let me know if you track this down, I'm curious too.

from pyvips.

jramapuram avatar jramapuram commented on July 19, 2024

Sorry for all the hassle; if I find what is blocking this function from being called I'll submit a PR

from pyvips.

DSLituiev avatar DSLituiev commented on July 19, 2024

I am having a similar issue on Ubuntu 18. I installed libvips from github. I had to apt install -y gtk-doc-tools gobject-introspection to make ./autogen.sh work, and then as described make && make install.
Now I do see libvips installed

ls /usr/local/lib/libvips*
/usr/local/lib/libvips.a	  /usr/local/lib/libvips-cpp.so.42.9.1
/usr/local/lib/libvips-cpp.a	  /usr/local/lib/libvips.la
/usr/local/lib/libvips-cpp.la	  /usr/local/lib/libvips.so
/usr/local/lib/libvips-cpp.so	  /usr/local/lib/libvips.so.42
/usr/local/lib/libvips-cpp.so.42  /usr/local/lib/libvips.so.42.9.1

installing using pip in a conda environment:

pip install -U pyvips --verbose
pip log
Created temporary directory: /tmp/pip-ephem-wheel-cache-_9cqycim
Created temporary directory: /tmp/pip-req-tracker-js8i0l0b
Created requirements tracker '/tmp/pip-req-tracker-js8i0l0b'
Created temporary directory: /tmp/pip-install-1dspaavh
Collecting pyvips
  1 location(s) to search for versions of pyvips:
  * https://pypi.org/simple/pyvips/
  Getting page https://pypi.org/simple/pyvips/
  Starting new HTTPS connection (1): pypi.org:443
  https://pypi.org:443 "GET /simple/pyvips/ HTTP/1.1" 200 1481
  Analyzing links from page https://pypi.org/simple/pyvips/
    Found link https://files.pythonhosted.org/packages/6a/2d/5ca1ee5077f733335c208b7a3f3d62f964aaab87731ab3e2850e404df7f1/pyvips-2.0.0-py2.py3-none-any.whl#sha256=c99590364cfc620af0db004aa9c6e6830a3c337d0db074d0a61da74dd4b91071 (from https://pypi.org/simple/pyvips/), version: 2.0.0
    Found link https://files.pythonhosted.org/packages/40/99/2d9991eff005de6674f155808423e8aac934ba50b5c8858abef5e148c51f/pyvips-2.0.1-py2.py3-none-any.whl#sha256=bf74b25a91bed8d9a96be8d457ce26ee487bf8b72c48f2c56aa643e233e341b2 (from https://pypi.org/simple/pyvips/), version: 2.0.1
    Found link https://files.pythonhosted.org/packages/b6/3a/261808544f6832f6e00b6ee26435210d6293cc022b9c51e2b48543575dc5/pyvips-2.0.2-py2.py3-none-any.whl#sha256=e6a6541672c6eab62ab8442738742b021c624a7b51b49c1ba9ab9aa99935692f (from https://pypi.org/simple/pyvips/), version: 2.0.2
    Found link https://files.pythonhosted.org/packages/62/32/bd01d86b81fdd84c0699cda1c40b0334f63e4deb981d22f468b3ef681513/pyvips-2.0.3-py2.py3-none-any.whl#sha256=0939c390af4584d2a48d488630f0f249d234e6087b188f7e8a70418479b66488 (from https://pypi.org/simple/pyvips/), version: 2.0.3
    Found link https://files.pythonhosted.org/packages/47/1f/a646ed24baab8404d7ce485e088bd58ec2ec4e9108089dffa6acf42b6347/pyvips-2.0.4-py2.py3-none-any.whl#sha256=f1b502e20d3b12abf295a2eb57387061b3285b6f93a228a1c0beada01a2e435d (from https://pypi.org/simple/pyvips/), version: 2.0.4
    Found link https://files.pythonhosted.org/packages/17/08/9314ee0082c56aeac9dbbc23f5948e1e884ac9679cf6032197d5be34fa56/pyvips-2.0.5-py2.py3-none-any.whl#sha256=684a459452b1b1968c7c8dbd636cdb669f780e9927291dc469a25c751e9337be (from https://pypi.org/simple/pyvips/), version: 2.0.5
    Found link https://files.pythonhosted.org/packages/b5/74/5c963d0dcc76fb467902e18aab55500158f5c9acdc86235061a878c16376/pyvips-2.1.0-py2.py3-none-any.whl#sha256=eec805bba1de3bcaedf855a5696c85ca550896785e1fdf96ef7021248850b618 (from https://pypi.org/simple/pyvips/), version: 2.1.0
    Found link https://files.pythonhosted.org/packages/a0/32/f819aa0de7394b4d714fece744bde53ee82df5e545e4c5affb17563bdfcd/pyvips-2.1.0.tar.gz#sha256=4196e80ef03ca7efff21f00866e1302c5e90d45a8d9d87f3e5b122a1ba04ced2 (from https://pypi.org/simple/pyvips/), version: 2.1.0
    Found link https://files.pythonhosted.org/packages/c2/42/dbb88d6049ec0cdd5aa62070019d50a9381cb390dd5e68ab3c062b0a5260/pyvips-2.1.1.tar.gz#sha256=034210a7bfdbe574e07f71c96ca8cca3cc6072a5460032dad2794d8e75bd43dc (from https://pypi.org/simple/pyvips/), version: 2.1.1
    Found link https://files.pythonhosted.org/packages/5c/6e/df4a34a9c8b349e40d6400bd4ac40558b3497732795fa0399596155b18b1/pyvips-2.1.2.tar.gz#sha256=c9de58aa073194e85ea0b8e90cb6b6a22905293c5c53d030424bec40dbe281ad (from https://pypi.org/simple/pyvips/), version: 2.1.2
    Found link https://files.pythonhosted.org/packages/60/fb/820d471aa27cea5c11e752579cf11308adcfbd18558f509e7a7a5d7f229b/pyvips-2.1.3.tar.gz#sha256=223bb78753866c604a9918d89b53b5dd7b6102c5302c6672f0c4cb047c4c15f2 (from https://pypi.org/simple/pyvips/), version: 2.1.3
    Found link https://files.pythonhosted.org/packages/b3/55/abb37dfddb4907b00b0e55b85cda090aa0704f9a587d62b925b0238e898c/pyvips-2.1.4.tar.gz#sha256=4fb56ab9f30baa1d1103e488e368e60387a936dc9682b2456327bbfa2dc00a55 (from https://pypi.org/simple/pyvips/), version: 2.1.4
    Found link https://files.pythonhosted.org/packages/39/1e/b1df477d78bba37d3b9f83258e9a44bb505355e2e56a82e8398bfe699096/pyvips-2.1.5.tar.gz#sha256=42dfbf14f19374bef7db89f3943758deec3dc055c026ff9ae5fbd09a7cb1c0e3 (from https://pypi.org/simple/pyvips/), version: 2.1.5
    Found link https://files.pythonhosted.org/packages/ae/dd/8a223ac12ed4cc5bfe85b81503683bcf4c49804f176cebe13ff28ee88ce3/pyvips-2.1.6.tar.gz#sha256=36d41051da83a87ff0becf98c34f6e72921f64f0c3a6e0f180bae267e4d87a73 (from https://pypi.org/simple/pyvips/), version: 2.1.6
  Using version 2.1.6 (newest of versions: 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6)
  Created temporary directory: /tmp/pip-unpack-gkwj6e21
  Starting new HTTPS connection (1): files.pythonhosted.org:443
  https://files.pythonhosted.org:443 "GET /packages/ae/dd/8a223ac12ed4cc5bfe85b81503683bcf4c49804f176cebe13ff28ee88ce3/pyvips-2.1.6.tar.gz HTTP/1.1" 200 34372
  Downloading https://files.pythonhosted.org/packages/ae/dd/8a223ac12ed4cc5bfe85b81503683bcf4c49804f176cebe13ff28ee88ce3/pyvips-2.1.6.tar.gz
  Downloading from URL https://files.pythonhosted.org/packages/ae/dd/8a223ac12ed4cc5bfe85b81503683bcf4c49804f176cebe13ff28ee88ce3/pyvips-2.1.6.tar.gz#sha256=36d41051da83a87ff0becf98c34f6e72921f64f0c3a6e0f180bae267e4d87a73 (from https://pypi.org/simple/pyvips/)
  Added pyvips from https://files.pythonhosted.org/packages/ae/dd/8a223ac12ed4cc5bfe85b81503683bcf4c49804f176cebe13ff28ee88ce3/pyvips-2.1.6.tar.gz#sha256=36d41051da83a87ff0becf98c34f6e72921f64f0c3a6e0f180bae267e4d87a73 to build tracker '/tmp/pip-req-tracker-js8i0l0b'
    Running setup.py (path:/tmp/pip-install-1dspaavh/pyvips/setup.py) egg_info for package pyvips
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/pyvips.egg-info
    writing pip-egg-info/pyvips.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/pyvips.egg-info/dependency_links.txt
    writing requirements to pip-egg-info/pyvips.egg-info/requires.txt
    writing top-level names to pip-egg-info/pyvips.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/pyvips.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/pyvips.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/pyvips.egg-info/SOURCES.txt'
  Source in /tmp/pip-install-1dspaavh/pyvips has version 2.1.6, which satisfies requirement pyvips from https://files.pythonhosted.org/packages/ae/dd/8a223ac12ed4cc5bfe85b81503683bcf4c49804f176cebe13ff28ee88ce3/pyvips-2.1.6.tar.gz#sha256=36d41051da83a87ff0becf98c34f6e72921f64f0c3a6e0f180bae267e4d87a73
  Removed pyvips from https://files.pythonhosted.org/packages/ae/dd/8a223ac12ed4cc5bfe85b81503683bcf4c49804f176cebe13ff28ee88ce3/pyvips-2.1.6.tar.gz#sha256=36d41051da83a87ff0becf98c34f6e72921f64f0c3a6e0f180bae267e4d87a73 from build tracker '/tmp/pip-req-tracker-js8i0l0b'
Requirement already satisfied, skipping upgrade: cffi>=1.0.0 in /home/exx/.conda/envs/digipath/lib/python3.7/site-packages (from pyvips) (1.12.2)
Requirement already satisfied, skipping upgrade: pycparser in /home/exx/.conda/envs/digipath/lib/python3.7/site-packages (from cffi>=1.0.0->pyvips) (2.19)
Installing collected packages: pyvips
  Created temporary directory: /tmp/pip-record-ds4zqgp9
  Running setup.py install for pyvips ...     Running command /home/exx/.conda/envs/digipath/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1dspaavh/pyvips/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-ds4zqgp9/install-record.txt --single-version-externally-managed --compile
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/pyvips
    copying pyvips/vobject.py -> build/lib/pyvips
    copying pyvips/vregion.py -> build/lib/pyvips
    copying pyvips/gobject.py -> build/lib/pyvips
    copying pyvips/decls.py -> build/lib/pyvips
    copying pyvips/base.py -> build/lib/pyvips
    copying pyvips/version.py -> build/lib/pyvips
    copying pyvips/voperation.py -> build/lib/pyvips
    copying pyvips/vimage.py -> build/lib/pyvips
    copying pyvips/gvalue.py -> build/lib/pyvips
    copying pyvips/__init__.py -> build/lib/pyvips
    copying pyvips/enums.py -> build/lib/pyvips
    copying pyvips/error.py -> build/lib/pyvips
    copying pyvips/pyvips_build.py -> build/lib/pyvips
    copying pyvips/vinterpolate.py -> build/lib/pyvips
    running install_lib
    creating /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/vobject.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/vregion.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/gobject.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/decls.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/base.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/version.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/voperation.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/vimage.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/gvalue.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/__init__.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/enums.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/error.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/pyvips_build.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    copying build/lib/pyvips/vinterpolate.py -> /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/vobject.py to vobject.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/vregion.py to vregion.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/gobject.py to gobject.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/decls.py to decls.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/base.py to base.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/version.py to version.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/voperation.py to voperation.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/vimage.py to vimage.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/gvalue.py to gvalue.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/__init__.py to __init__.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/enums.py to enums.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/error.py to error.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/pyvips_build.py to pyvips_build.cpython-37.pyc
    byte-compiling /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/vinterpolate.py to vinterpolate.cpython-37.pyc
    running install_egg_info
    running egg_info
    writing pyvips.egg-info/PKG-INFO
    writing dependency_links to pyvips.egg-info/dependency_links.txt
    writing requirements to pyvips.egg-info/requires.txt
    writing top-level names to pyvips.egg-info/top_level.txt
    reading manifest file 'pyvips.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pyvips.egg-info/SOURCES.txt'
    Copying pyvips.egg-info to /home/exx/.conda/envs/digipath/lib/python3.7/site-packages/pyvips-2.1.6-py3.7.egg-info
    running install_scripts
    writing list of installed files to '/tmp/pip-record-ds4zqgp9/install-record.txt'
done
  Removing source in /tmp/pip-install-1dspaavh/pyvips
Successfully installed pyvips-2.1.6
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-js8i0l0b'
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 200 11244
Analyzing links from page https://pypi.org/simple/pip/

Trying to import it

import os
os.environ['LD_LIBRARY_PATH'] ='/usr/local/lib'
import logging
logging.basicConfig(level = logging.DEBUG)
import pyvips
Leads to a similar error:
DEBUG:pyvips:Binary module load failed: No module named '_libvips'
DEBUG:pyvips:Falling back to ABI mode
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
~/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/__init__.py in <module>
     18 try:
---> 19     import _libvips
     20 

ModuleNotFoundError: No module named '_libvips'

During handling of the above exception, another exception occurred:

OSError                                   Traceback (most recent call last)
<ipython-input-2-2df87fc82c0a> in <module>
      1 import logging
      2 logging.basicConfig(level = logging.DEBUG)
----> 3 import pyvips

~/.conda/envs/digipath/lib/python3.7/site-packages/pyvips/__init__.py in <module>
     69     # possibly use ctypes.util.find_library() to locate the lib?
     70     gobject_lib = ffi.dlopen(_gobject_libname)
---> 71     vips_lib = ffi.dlopen(_vips_libname)
     72     if _glib_libname:
     73         glib_lib = ffi.dlopen(_glib_libname)

~/.conda/envs/digipath/lib/python3.7/site-packages/cffi/api.py in dlopen(self, name, flags)
    144         assert isinstance(name, basestring) or name is None
    145         with self._lock:
--> 146             lib, function_cache = _make_ffi_library(self, name, flags)
    147             self._function_caches.append(function_cache)
    148             self._libraries.append(lib)

~/.conda/envs/digipath/lib/python3.7/site-packages/cffi/api.py in _make_ffi_library(ffi, libname, flags)
    826 def _make_ffi_library(ffi, libname, flags):
    827     backend = ffi._backend
--> 828     backendlib = _load_backend_lib(backend, libname, flags)
    829     #
    830     def accessor_function(name):

~/.conda/envs/digipath/lib/python3.7/site-packages/cffi/api.py in _load_backend_lib(backend, name, flags)
    821         if first_error is not None:
    822             msg = "%s.  Additionally, %s" % (first_error, msg)
--> 823         raise OSError(msg)
    824     return backend.load_library(path, flags)
    825 

OSError: cannot load library 'libvips.so.42': libvips.so.42: cannot open shared object file: No such file or directory.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'libvips.so.42'

There is nothing like copying build/lib.linux-x86_64-2.7/_libvips.so -> build/bdist.linux-x86_64/wheel in the pip log.
What went wrong here?

from pyvips.

DSLituiev avatar DSLituiev commented on July 19, 2024

When I clone the repository and run
python setup.py build_ext, the log is very laconic:

running build_ext

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Some people have had success with conda, most have not, I think.

I would switch to standard Python, or make a conda package for libvips.

from pyvips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.