Giter VIP home page Giter VIP logo

Comments (25)

jcupitt avatar jcupitt commented on July 19, 2024

Hello, I have a PC at home now, I'll have a go later.

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

I tried on my win10 PC and it installed OK following the instructions.

  1. Download py 3.6 64-bit from python.org and install, including adding to PATH
  2. Download vips-8.6.3-1 64-bit windows binary, unzip to c:\vips-dev-8.6 (can be anywhere)
  3. Open "Advanced System Settings" and use the Environment Variables button to add c:\vips-dev-8.6\bin to Path.
  4. At a command prompt, verify that running vips works. You may need to log out and in, or even reboot to get the new path value.
  5. At a command prompt, pip install pyvips
  6. Start python and import pyvips works.

Are you using Anaconda? They have their own system and standard pip packages may not work. You should probably ask there for support, or switch to regular python.

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

I revised the README to make this a little clearer.

from pyvips.

HackersSpirit avatar HackersSpirit commented on July 19, 2024

Hello,
I have followed the same steps as mentioned above but gives me error of libvips-42.dll
I tried replacing the dlls from other versions it still gives me error.
Many error are related to entry points so i tried replacing the dlls from other versions. As in one of the threads i saw that following functionality would be missing in the given dll file.

Please Note: The only difference which i notice now is i have created a virtual env. But as i can see other modules getting installed correctly this should't create a problem

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

I don't think you can have set your path correctly. Start a command prompt and, without changing directory, type "vips". Do you get some output, or a "command not found" error?

from pyvips.

HackersSpirit avatar HackersSpirit commented on July 19, 2024

image

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

I see:

Microsoft Windows [Version 10.0.17134.48]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\jcupi>echo %PATH%
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;C:\Users\jcupi\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\jcupi\AppData\Local\Programs\Python\Python36\;C:\Users\jcupi\AppData\Local\Programs\Python\Launcher\;C:\Users\jcupi\AppData\Local\Microsoft\WindowsApps;c:\vips-dev-8.6\bin;

C:\Users\jcupi>vips
Usage:
  vips [OPTIONâ?▌] [ACTION] [OPTIONS] [PARAMETERS] - VIPS driver program

Help Options:
  -h, --help                    Show help options

Application Options:
  -l, --list=BASE-NAME          list objects
  -p, --plugin=PLUGIN           load PLUGIN
  -v, --version                 print version
  --vips-concurrency=N          evaluate with N concurrent threads
  --vips-progress               show progress feedback
  --vips-leak                   leak-check on exit
  --vips-profile                profile and dump timing on exit
  --vips-disc-threshold=N       images larger than N are decompressed to disc
  --vips-novector               disable vectorised versions of operations
  --vips-cache-max=N            cache at most N operations
  --vips-cache-max-memory=N     cache at most N bytes in memory
  --vips-cache-max-files=N      allow at most N open files
  --vips-cache-trace            trace operation cache
  --vips-cache-dump             dump operation cache on exit
  --vips-version                print libvips version


C:\Users\jcupi>dir/w c:\vips-dev-8.6\bin
 Volume in drive C is OS
 Volume Serial Number is 8E41-642A

 Directory of c:\vips-dev-8.6\bin

[.]                                 [..]                                libasprintf-0.dll
libatomic-1.dll                     libcairo-2.dll                      libcairo-gobject-2.dll
libcairo-script-interpreter-2.dll   libcharset-1.dll                    libcroco-0.6-3.dll
libexif-12.dll                      libexpat-1.dll                      libffi-6.dll
libfftw3-3.dll                      libfontconfig-1.dll                 libfreetype-6.dll
libgcc_s_seh-1.dll                  libgdk_pixbuf-2.0-0.dll             libgettextlib-0-19-8.dll
libgettextpo-1.dll                  libgettextsrc-0-19-8.dll            libgif-7.dll
libgio-2.0-0.dll                    libglib-2.0-0.dll                   libgmodule-2.0-0.dll
libgobject-2.0-0.dll                libgsf-1-114.dll                    libgsf-win32-1-114.dll
libgthread-2.0-0.dll                libharfbuzz-0.dll                   libharfbuzz-subset-0.dll
libiconv-2.dll                      libintl-9.dll                       libjpeg-62.dll
liblcms2-2.dll                      libMagickCore-6.Q16-2.dll           libMagickWand-6.Q16-2.dll
libmatio-4.dll                      libopenjp2.dll                      libopenslide-0.dll
libpango-1.0-0.dll                  libpangocairo-1.0-0.dll             libpangoft2-1.0-0.dll
libpangowin32-1.0-0.dll             libpixman-1-0.dll                   libpng16-16.dll
libpoppler-63.dll                   libpoppler-glib-8.dll               libquadmath-0.dll
librsvg-2-2.dll                     libsqlite3-0.dll                    libssp-0.dll
libstdc++-6.dll                     libtiff-5.dll                       libvips-42.dll
libvips-cpp-42.dll                  libvipsCC-42.dll                    libwebp-7.dll
libwebpdemux-2.dll                  libwebpmux-3.dll                    libxml2-2.dll
libz.dll                            vips.exe                            vipsedit.exe
vipsheader.exe                      vipsthumbnail.exe
              63 File(s)     72,777,102 bytes
               2 Dir(s)  638,847,635,456 bytes free

C:\Users\jcupi>pip list
Package    Version
---------- -------
cffi       1.11.5
pip        10.0.1
pycparser  2.18
pyvips     2.1.2
setuptools 39.0.1

C:\Users\jcupi>python
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvips
>>> ^Z

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Also, don't move DLLs around or copy files from previous versions. Just download 8.6.3-1 and unzip it.

from pyvips.

HackersSpirit avatar HackersSpirit commented on July 19, 2024

image
image
image
image
image I tried making the changes suggested by you and also there is no issue if i try to check the library using command prompt. It creates a problem only when i call it through my python code

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Then your Python code does not have PATH set. You need to check the environment in which your Python interpreter is running. Is it running as a different user, for example? You might also need to log out and in again to have PATH set in all parts of your session.

from pyvips.

HackersSpirit avatar HackersSpirit commented on July 19, 2024

Is vips library built on 32 bit or 64-bit system

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

The precompiled Windows binaries are 64-bit, but you can make your own 32-bit binaries, of course.

from pyvips.

HackersSpirit avatar HackersSpirit commented on July 19, 2024

Thanks for the reply.
Regarding the path i have checked all the paths but still i am unable to run. Can you please suggest of any other possibilities.

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

You could try this just before you import pyvips:

import os
print('path =', os.getenv('PATH'))

And verify that the correct value for PATH is set.

from pyvips.

HackersSpirit avatar HackersSpirit commented on July 19, 2024

@jcupitt : Yes the path is set correctly. For both python interpreter and libvips

Sample output of above command:

('path =', 'C:\Users\thermo\Envs\PyCode\Scripts;C:\Python27\;C:\Python27\Scripts;;C:\vips-dev-8.6\bin;

Can i get the steps to build the library on my base machine instead of using the docker image.

from pyvips.

kleisauke avatar kleisauke commented on July 19, 2024

It looks like libgobject-2.0-0.dll and libcairo-2.dll is included from another directory. You could try to reorder your PATH environment variable so that C:\vips-dev-8.6\bin is included first.

I'll do some tests on my Windows PC tonight.

from pyvips.

HackersSpirit avatar HackersSpirit commented on July 19, 2024

@kleisauke: Sure will let u know

from pyvips.

HackersSpirit avatar HackersSpirit commented on July 19, 2024

@jcupitt @kleisauke : Thanks a lot for you help.
The issue got solved. As @jcupitt stated earlier it was path issue.
@kleisauke : As per your suggestion i moved the vips-dev path to the top most of my path variables and it got resolved.
Just one question how did you figure out libgobject-2.0-0.dll and libcairo-2.dll are causing issues :)

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Oh good, I'm glad it's working.

You may find some other piece of software has now broken though :( The libvips DLLs at the front of the path may hide older versions of the same libraries that something else is using, and they might not be binary compatible. Hopefully it'll be OK.

from pyvips.

HackersSpirit avatar HackersSpirit commented on July 19, 2024

@jcupitt : Yup, I am concerned about my flycapture sdk which is using the same dll's.
Till now its working fine but cannot tell what part will create the issue.
Just one clarification, can i reinitialize all the path in my virtual environment so that i can keep the earlier paths intact

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

I'd think so, but you'd need to test it (of course).

from pyvips.

HackersSpirit avatar HackersSpirit commented on July 19, 2024

@jcupitt : Ok thanks

from pyvips.

mherawi avatar mherawi commented on July 19, 2024

Hi,

I'm getting the following error: "ModuleNotFoundError: No module named '_libvips'"
image
I already added the path into environmental variables and also tried a clean install with pip install --no-cache-dir pyvip. Can you please provide any suggestion on how to fix the issue?
thanks

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

That looks like a different problem. Could you open a new issue, please?

from pyvips.

jcupitt avatar jcupitt commented on July 19, 2024

Here's another solution for reference:

Don't change the system PATH since you can get DLL conflicts with other installed programs. Instead, set PATH in your Python program itself. Start your program with something like:

# change this for your install location and vips version, and remember to 
# use double backslashes
vipshome = 'c:\\vips-dev-8.7\\bin'

# set PATH
import os
os.environ['PATH'] = vipshome + ';' + os.environ['PATH']

# and now pyvips will pick up the DLLs in the vips area
import pyvips

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.