Fatal Python error: Segmentation fault for MACOS 15.6.1 for correct python code

I've run python 3.10.18 via sqlalchemy 1.4.39 create connection to MS SQL DB on macos 15.6.1 and got the error:


Fatal Python error: Segmentation fault for MACOS 15.6.1

Extension modules: charset_normalizer.md, google._upb._message, snappy._snappy, lz4._version, lz4.frame._frame, lxml._elementpath, lxml.etree, yaml._yaml, grpc._cython.cygrpc, sqlalchemy.cimmutabledict, sqlalchemy.cprocessors, sqlalchemy.cresultproxy, pyodbc (total: 13)

tried this question without success


there were no such a problem 3 days before. Tried to clear cache and reinstall python versions without any success.


How to fix this?

MacBook Pro 14″, macOS 15.6

Posted on Oct 6, 2025 2:01 AM

Reply
2 replies

Oct 6, 2025 5:40 AM in response to tusenka

Apple Support Communities is not the destination to resolve Python programming issues involving an out of date Python version or the use of several third-party Python modules to work with an MS SQL database. I would check with the vendors of those third-party Python modules to confirm that any pip updated versions are still compatible with what you are attempting to do. And, macOS 15.6.1 is significantly out of date too.

Oct 6, 2025 8:49 AM in response to tusenka

What VikingOSX said about this not being a proper venue for this problem.


And even if it were, it is impossible to debug code with this sort of information.

We have no idea what Python modules are used, which versions of these modules (often just as important, as one of the problems is often compatibility of multiple versions of different packages or modules with one another).

It is not very usual for Python code to fail with Segmentation Fault; usually your program might abort with an exception. But you could also be linking with low level libraries programmed in C or Rust, or... it's just impossible to say. And even the fact that it worked yesterday and is failing now could be due to your database, the contents of your tables, so many things. I once had a C program that worked flawlessly for 10 years until a particular bug reared its ugly head. It had been there all along, though.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Fatal Python error: Segmentation fault for MACOS 15.6.1 for correct python code

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.