Find answers from the community

Updated 2 years ago

GPT Index + Unstructured, libmagic issue

we chatted offline, but FYI to anyone else facing this issue: try pip install python-magic-bin==0.4.14
L
b
h
6 comments
Looks like I'm having a similar issue, but can't install that package above because it says it can't find a version that satisfies the requirements. I'm wondering if it's because I'm on an M1 Mac - I might need to try running Python in rosetta emulation mode
For what it's worth, I tried installing libmagic using brew install libmagic and a few other things I found on Google, but still not working
So that was the issue - as soon as I switched over to using Python in x86_64 mode, things started working better. There were still quite a few pip commands I had to run to setup unstructured, but it is way faster because pypy has all the wheels built for the x86_64 platform. Wish I knew that a few hours ago!
Having a message recommending people to use x86_64 mode on Mac in the 'get started' docs might be a good idea, given there's a lot of interest around generative search at the moment!
interesting on colab I faced similar issue and solved it with:

Plain Text
!apt-get install libmagic-dev
!pip install python-magic

import magic
@LarryHudson @bonzai thx -- we've added a note about this in the readme. brew install libmagic is what worked for me when I was making it. Lmk if the pip install works -- we can see if adding it to requirements solves it
Add a reply
Sign up and join the conversation on Discord