macOS Catalina 10.15 , I upgrdaded to this version and I have segmentation fault :11 error when I run python. need help regarding this

macOS Catalina 10.15 , I upgrdaded to this version and I have segmentation fault :11 error when I run python. need help regarding this

how can i downgrade?

Posted on Oct 21, 2019 2:26 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 23, 2019 4:29 AM

Python.org has their own installers that you can download and use directly. This is what I do. Your crash shows Python 3.7.3 installed by homebrew package manager. Although I have homebrew installed, I never install Python (or Ruby) with it.


As I mentioned earlier, check your user added packages, and the one I suggest is the lightgbm package, as it is shown in the crash information. It may be only 32-bit, and that would be either the cause, or contributing to the crash.


Secondarily, if you have not updated your iTerm2 app in awhile, get the newest, non-beta version available, and if there are any comments about iTerm2 and Catalina, you should read those too.


Catalina has deprecated Python, Ruby, and Perl. That does not mean that they have been removed, though it is a warning that they will be, probably withy 10.16 in Fall 2020. Starting in January 2020, Python 2.7.n will be retired by Python.org, so the handwriting is on the wall, so to speak for the 2.7 Python code.

10 replies
Question marked as Top-ranking reply

Oct 23, 2019 4:29 AM in response to u88tok

Python.org has their own installers that you can download and use directly. This is what I do. Your crash shows Python 3.7.3 installed by homebrew package manager. Although I have homebrew installed, I never install Python (or Ruby) with it.


As I mentioned earlier, check your user added packages, and the one I suggest is the lightgbm package, as it is shown in the crash information. It may be only 32-bit, and that would be either the cause, or contributing to the crash.


Secondarily, if you have not updated your iTerm2 app in awhile, get the newest, non-beta version available, and if there are any comments about iTerm2 and Catalina, you should read those too.


Catalina has deprecated Python, Ruby, and Perl. That does not mean that they have been removed, though it is a warning that they will be, probably withy 10.16 in Fall 2020. Starting in January 2020, Python 2.7.n will be retired by Python.org, so the handwriting is on the wall, so to speak for the 2.7 Python code.

Oct 22, 2019 8:37 AM in response to VikingOSX

Hello, I really appreciate the help you are offering and most importantly your time.

  1. I had python only from python.org all 64 bit
  2. currently i have python 2.7 ( 64 bit) and had python 3.6 (64bit) , now updated to catalina so it is python 3.7 (64bit)
  3. after update i re-installed all the packages I required and made sure nothing is broken,
  4. now at bash terminal, during code execution, it just blinks then says segmentation fault and says report send to apple community.

I think may be somehow although I was using python 3, somewhere the framework is linked to 2.7 and since Catalina now does not support 2.7, it is crashing. Could this be a possibility?

Thank you

Oct 22, 2019 7:10 AM in response to u88tok

There are few issues:

  1. Have you installed any third-party Python packages that are 32-bit, and if so, do the developers now offer recompiled, 64-bit versions of these packages? On Catalina, even a 64-bit Python interpreter attempting to execute a 32-bit module will just explode.
  2. Are you subprocessing out to a 32-bit application that cannot run in Catalina?
  3. If you did not get your Python 3.6.5 from Python.org, it may not be entirely 64-bit, and needs to have that resolved with the distributor. Python 3.6.5 is out of date with the recently released Python 3.8.0.
  4. There is a Python2 to Python3 converter included (e.g. 2to3) but I have not used it yet. Documentation/example. Ensure item 1 thru 3 are resolved beforehand.
  5. You may have an innocent coding error that goes in the ditch under certain conditions. What line of your code does the crash point too? Are you developing in the third-party PyObjC?


I have found myself determining what imported Python2 module broke in Python3, and comparing that modules implementation in Python2 with its replacement module's documentation at Python.org or the version of Python3 in use. Sometimes, I can make Python2 code just work in Python3 by using a try/except block around import statements (like this):


#!/usr/bin/env python3
# coding: utf-8

import sys

try:
    import Tkinter as tk      # Python 2
except ImportError:
    import tkinter as tk      # Python 3

print("Tcl Version: {}".format(tk.Tcl().eval('info patchlevel')))
print("Tk Version: {}".format(tk.Tk().eval('info patchlevel')))
sys.exit()



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.

macOS Catalina 10.15 , I upgrdaded to this version and I have segmentation fault :11 error when I run python. need help regarding this

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