When I try importing the Whatsapp from the whatsappy library, I keep getting this error:
File "/Users/Ocean/Downloads/whatsapp-bot/index.py", line 1, in <module>
from whatsappy import Whatsapp
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/whatsappy/__init__.py", line 1, in <module>
from .main import Whatsapp
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/whatsappy/main.py", line 26, in <module>
from .message import *
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/whatsappy/message.py", line 3, in <module>
from PIL import Image as PILImage
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PIL/Image.py", line 103, in <module>
from . import _imaging as core
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PIL/_imaging.cpython-310-darwin.so, 2): Library not loaded: @loader_path/libXdmcp.6.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PIL/.dylibs/libxcb.1.1.0.dylib
Reason: no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PIL/.dylibs/libXdmcp.6.dylib: cannot load 'libXdmcp.6.dylib' (load command 0x80000034 is unknown)
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PIL/.dylibs/libXdmcp.6.dylib: cannot load 'libXdmcp.6.dylib' (load command 0x80000034 is unknown)
When I try importing the
Whatsapp
from thewhatsappy
library, I keep getting this error:Can someone please help? Thank you!