-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import issue on MacOS M1 #171
Comments
same issue. |
up +1 |
+1 |
1 similar comment
+1 |
Hi, Any ideas how to fix it? |
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'))`
The text was updated successfully, but these errors were encountered: