-
Notifications
You must be signed in to change notification settings - Fork 136
Description
Hi there,
when I'm trying to import the BlingFire library I get the following error. Any suggestions on how to fix it?
`---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[15], line 1
----> 1 from blingfire import *
3 text = 'After reading this post, you will know: What "natural language" is and how it is different from other types of data. What makes working with natural language so challenging. [1]'
5 print(text_to_sentences(text))
File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/blingfire/init.py:19
17 # detect Mac OSX
18 elif platform.system() == "Darwin":
---> 19 blingfire = cdll.LoadLibrary(os.path.join(path, "libblingfiretokdll.dylib"))
20 else:
21 # detect linux
22 blingfire = cdll.LoadLibrary(os.path.join(path, "libblingfiretokdll.so"))
File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ctypes/init.py:454, in LibraryLoader.LoadLibrary(self, name)
453 def LoadLibrary(self, name):
--> 454 return self._dlltype(name)
File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ctypes/init.py:376, in CDLL.init(self, name, mode, handle, use_errno, use_last_error, winmode)
373 self._FuncPtr = _FuncPtr
375 if handle is None:
--> 376 self._handle = _dlopen(self._name, mode)
377 else:
378 self._handle = handle
OSError: dlopen(/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/blingfire/libblingfiretokdll.dylib, 0x0006): tried: '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/blingfire/libblingfiretokdll.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/blingfire/libblingfiretokdll.dylib' (no such file), '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/blingfire/libblingfiretokdll.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))`