-
Notifications
You must be signed in to change notification settings - Fork 1
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
Python import of automesh module gives import error. #198
Comments
Python package automesh is trying to load a shared library ( updated about 4 years ago |
that is weird, I dont get the same errors on Ubuntu, and the Mac runners dont seem to have any issues |
yeah, maybe my mac is deficient some how, I will tinker with it more... stay tuned 🤓 |
Why does the above error look for the library here: I haven't installed a Python with brew, viz., chovey@machine/Users/chovey> brew list
==> Formulae
cmake fish gh git-lfs ncurses pcre2 ripgrep To find sudo find / -name "liblzma.5.dylib" 2>/dev/null /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PIL/.dylibs/liblzma.5.dylib
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/PIL/.dylibs/liblzma.5.dylib
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/cv2/.dylibs/liblzma.5.dylib
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PIL/.dylibs/liblzma.5.dylib
/System/Volumes/Data/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PIL/.dylibs/liblzma.5.dylib
/System/Volumes/Data/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/PIL/.dylibs/liblzma.5.dylib
/System/Volumes/Data/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/cv2/.dylibs/liblzma.5.dylib
/System/Volumes/Data/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PIL/.dylibs/liblzma.5.dylib
/System/Volumes/Data/Users/chovey/recon3d/.venv/lib/python3.11/site-packages/PIL/.dylibs/liblzma.5.dylib
... |
It appears import lzma
# Example data to compress
data = b'This is some data to compress. ' * 10 # Create a larger byte string
# Compress the data
compressed_data = lzma.compress(data)
print(f'Compressed data: {compressed_data}')
# Decompress the data
decompressed_data = lzma.decompress(compressed_data)
print(f'Decompressed data: {decompressed_data.decode()}') # Decode bytes to string >>> import lzma
>>>
>>> # Example data to compress
>>> data = b'This is some data to compress. ' * 10 # Create a larger byte string
>>>
>>> # Compress the data
>>> compressed_data = lzma.compress(data)
>>> print(f'Compressed data: {compressed_data}')
Compressed data: b"\xfd7zXZ\x00\x00\x04\xe6\xd6\xb4F\x02\x00!\x01\x16\x00\x00\x00t/\xe5\xa3\xe0\x015\x00%]\x00*\x1a\t'd\x1c\x87\x8f\x1d-\x1b1\x1a\xe0\x19o\x90\x95[\xb0\xc9\xa8G\xe6\xbb\xe85\xa7\xed\xa8\xa0+V\x0f\\\x00\x00\x00\x00\x00\x00\xb8\xfc\x8e\x95>\x0e;2\x00\x01A\xb6\x02\x00\x00\x00+8\xdf2\xb1\xc4g\xfb\x02\x00\x00\x00\x00\x04YZ"
>>>
>>> # Decompress the data
>>> decompressed_data = lzma.decompress(compressed_data)
>>> print(f'Decompressed data: {decompressed_data.decode()}') # Decode bytes to string
Decompressed data: This is some data to compress. This is some data to compress. This is some data to compress. This is some data to compress. This is some data to compress. This is some data to compress. This is some data to compress. This is some data to compress. This is some data to compress. This is some data to compress. |
@mrbuche automesh.cpython-311-darwin.so, 0x0002): Library not loaded: /opt/homebrew/opt/xz/lib/liblzma.5.dylib
Referenced from: <D27B9254-7A13-3D51-AC56-FE702D6503B9> /Users/chovey/recon3d/.venv/lib/python3.11/site-packages/automesh/automesh.cpython-311-darwin.so
Reason: tried: '/opt/homebrew/opt/xz/lib/liblzma.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/xz/lib/liblzma.5.dylib' (no such file), '/opt/homebrew/opt/xz/lib/liblzma.5.dylib' (no such file) Do you know if the macOS runners use homebrew? |
I do not think the runner use homebrew, this is definitely a strange one. Dependencies of dependencies are fun! From |
Describe the bug
ImportError on Python CLI with loading automesh module
To Reproduce
Expected behavior
The module loads and then I can use the module in Python.
Screenshots
n/a - python command line dump above
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: