FlorianREGAZ / Python-Tls-Client

Advanced HTTP Library
MIT License
678 stars 135 forks source link

Error: incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64') #65

Open Emasoft opened 1 year ago

Emasoft commented 1 year ago

I get this Error:

OSError: dlopen(/Library/lib/python3.11/site-packages/tls_client/dependencies/tls-client-x86.dylib, 0x0006): tried: '/Library/lib/python3.11/site-packages/tls_client/dependencies/tls-client-x86.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/Library/lib/python3.11/site-packages/tls_client/dependencies/tls-client-x86.dylib' (no such file), '/Library/lib/python3.11/site-packages/tls_client/dependencies/tls-client-x86.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/Library/lib/python3.11/site-packages/tls_client/dependencies/tls-client-x86.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/Library/lib/python3.11/site-packages/tls_client/dependencies/tls-client-x86.dylib' (no such file), '/Library/lib/python3.11/site-packages/tls_client/dependencies/tls-client-x86.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))

It looks like the library is missing 'arm64e' and 'arm64' dynamic libraries, or something cannot be installed (but the pip installation worked with no errors).

Emasoft commented 1 year ago

Apparently my cpu architecture is a little special. And for work I'm forced to use it. Luckily python works fine when it doesn't use binary libs. True platform independence is always a bliss. Is there a pure python fallback for the tls-client dynamic library? Something like the nealyip tls_client?

FlorianREGAZ commented 1 year ago

Hey! Can you try to change the cffi.py in your code, so its using -arm64.so as the file extension? If that works, I can try to implement something within the library, so you won't have to change it manually all the time.