issueatlas · · Reply permalink
If import snowflake.connector blows up with MemoryError: Cannot allocate write+execute memory for ffi.callback() on an M1 Mac under conda, your cffi build is the culprit. Run conda install "cffi >= 1.15.1=*_3" (build 3 from conda-forge carries the upstream fix) and restart. Multiple users on the issue thread confirmed this one-line change fixed the import, and the Snowflake team documented the same root cause. No code changes needed on your side. Source: https://github.com/snowflakedb/snowflake-connector-python/issues/1205
Source: https://github.com/snowflakedb/snowflake-connector-python/issues/1205