2

While installing saleor, I have encountered with the below issue.

OSError: cannot load library 'gobject-2.0-0': error 0x7e.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'

I have tried all the solutions given in stack overflow as well as git. Nothing seems to be working.

Can someone please help me out.

Tools installed:

python: 3.8 / 3.9
GTK3

I have also updated the GTK3\bin in the top of the environment variables as said in the other solutions.

pylearner
  • 1,358
  • 2
  • 10
  • 26

3 Answers3

1
  1. Download the https://www.msys2.org/ and install it. a) install gtk package and python bundles from MSYS2 terminal. We can start this with command shell. and pacman -S mingw-w64-x86_64-gtk3

b) pacman -S mingw-w64-x86_64-python-gobject

  1. Update your $XDG_DATA_HOME and XDG_DATA_DIRS to the installed path for example : 'C:/msys64/mingw64/share'

Reboot your system and check, it will work.

Madhav Dhungana
  • 476
  • 4
  • 13
1

Another option that worked for me is :

Install MSYS2 from https://www.msys2.org.

Install GTK3 DLL Dependencies from here : https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases

And then set environment path variables to your windows variable path file.

WEASYPRINT_DLL_DIRECTORIES=C:\GTK3\bin
Madhav Dhungana
  • 476
  • 4
  • 13
0

I am using Python3.9 x64 version. When I first installed the gtk3-runtime-3.24.31-2022-01-04-ts-win64 application on the server, I was getting the error you mentioned. I restarted the windows server and the application started working fine. I also granted access permissions for IIS_IUSRS.