gpt-researcher icon indicating copy to clipboard operation
gpt-researcher copied to clipboard

gobject library not found in mac

Open viswanath27 opened this issue 10 months ago • 8 comments

OSError: cannot load library 'gobject-2.0-0': dlopen(gobject-2.0-0, 0x0002): tried: '/gobject-2.0-0' (no such file), '/opt/homebrew/bin/gobject-2.0-0' (no such file), 'gobject-2.0-0' (no such file), '/System/Volumes/Preboot/Cryptexes/OSgobject-2.0-0' (no such file), '/Users/viswanathbarenkala/anaconda3/envs/gptresearcher/bin/../lib/gobject-2.0-0' (no such file), '/usr/lib/gobject-2.0-0' (no such file, not in dyld cache), 'gobject-2.0-0' (no such file), '/usr/local/lib/gobject-2.0-0' (no such file), '/usr/lib/gobject-2.0-0' (no such file, not in dyld cache). Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'

seem above is the issue in my mac.

I also have corrected the newspaper folder and file name as this is conflicting with the package name in python, post which this error is showing up

viswanath27 avatar Apr 27 '24 13:04 viswanath27

Encountered the same issue on the M3 MacBook. Refer to this method to solve the problem: https://github.com/assafelovic/gpt-researcher/issues/328#issuecomment-1952508496

lazyracket avatar Apr 27 '24 20:04 lazyracket

Thanks @lubuwei001 for the reference! I'll keep this open for now so others can see it

assafelovic avatar Apr 30 '24 14:04 assafelovic

Thanks @lubuwei001 for the reference! I'll keep this open for now so others can see it

Hi @assafelovic Shall I update the installation section in documentation to inform Mac users to install following libraries before they start using the tool?

  • gobject-introspection
  • pango

This would resolve following issues #328 #314 for windows

satishjasthi avatar May 09 '24 09:05 satishjasthi

brew install glib
brew install pango

Solved it for me

kairoswealth avatar May 13 '24 03:05 kairoswealth

@satishjasthi that would be great! Can you please update it here: https://github.com/assafelovic/gpt-researcher/blob/master/docs/docs/gpt-researcher/troubleshooting.md

assafelovic avatar May 13 '24 06:05 assafelovic

Ya sure @assafelovic , I have updated troubleshooting documentation with these changes and submitted PR

satishjasthi avatar May 13 '24 06:05 satishjasthi

Hey everyone, also updating that refined code to import problematic libraries so that it doesn't crash: https://github.com/assafelovic/gpt-researcher/commit/5f035b5fe4856b8016db59382011e0d5ff51b30a

Lmk if this resolves for you

assafelovic avatar May 19 '24 06:05 assafelovic

Hey everyone, also updating that refined code to import problematic libraries so that it doesn't crash: 5f035b5

Lmk if this resolves for you

It fixed this issue for me both on Win 10 Pro and Replit ( BTW GPT-Researcher still doesn't work on Repit, so a template would be appreciated! :) )

vanetreg avatar May 19 '24 10:05 vanetreg

Hello everyone, I have installed weasyprint via brew install weasyprint then I am able to run this command from terminal weasyprint https://weasyprint.org /tmp/weasyprint-website.pdf, but after installing python weasyprint = "^62.3" lib via poetry or pip, it started failing with below error

OSError: cannot load library 'gobject-2.0-0': dlopen(gobject-2.0-0, 0x0002): tried: 'gobject-2.0-0' (no such file), '/System/Volumes/Preboot/Cryptexes/OSgobject-2.0-0' (no such file), '/usr/lib/gobject-2.0-0' (no such file, not in dyld cache), 'gobject-2.0-0' (no such file), '/usr/lib/gobject-2.0-0' (no such file, not in dyld cache). Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'

I have Mac M1.

lxmn avatar Aug 05 '24 18:08 lxmn