Skip to content

Support Apple Silicon (arm64) #377

Open
@PiN73

Description

@PiN73

I'm getting error on macOS with M1 CPU

python-telegram version: 0.18.0

from telegram.client import Telegram

Telegram(
    api_id='api_id',
    api_hash='api_hash',
    phone='+31611111111',
    database_encryption_key='changekey123',
)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/.../env/lib/python3.9/site-packages/telegram/client.py", line 147, in __init__
    self._tdjson = TDJson(library_path=library_path, verbosity=tdlib_verbosity)
  File "/.../env/lib/python3.9/site-packages/telegram/tdjson.py", line 33, in __init__
    self._build_client(library_path, verbosity)
  File "/.../env/lib/python3.9/site-packages/telegram/tdjson.py", line 40, in _build_client
    self._tdjson = CDLL(library_path)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 366, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/.../env/lib/python3.9/site-packages/telegram/lib/darwin/libtdjson.dylib, 0x0006): tried: '/.../env/lib/python3.9/site-packages/telegram/lib/darwin/libtdjson.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/.../env/lib/python3.9/site-packages/telegram/lib/darwin/libtdjson.dylib' (no such file), '/.../env/lib/python3.9/site-packages/telegram/lib/darwin/libtdjson.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions