tursodatabase / libsql-experimental-python

libSQL API for Python
74 stars 8 forks source link

Pip install failed at libsql-ffi for Bad CPU type in executable #60

Open chrishawkins2013 opened 1 month ago

chrishawkins2013 commented 1 month ago

When running pip install libsql-experimental, process fails with several error lines, but most telling seems to be below. This fails at the same package as bug 58, but different reason.

thread 'main' panicked at /Users/UserName/.cargo/git/checkouts/libsql-e519d6234c1a233a/5a806fe/libsql-ffi/build.rs:358:33: called Result::unwrap() on an Err value: Os { code: 86, kind: Uncategorized, message: "Bad CPU type in executable" }

chrishawkins2013 commented 1 month ago

This problem is addressed by running the below in the terminal window. This installs Rosetta 2 from Apple which is not installed by default on new computers.

softwareupdate --install-rosetta --agree-to-license

I think most people know this already, but this further supports the idea that a file somewhere in the build is not compatible with Apple Silicon. My computer is using the M2 chip from apple. I have not been able to identify the file causing the problem.