Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python3.5 error 'dyld library not loaded: CoreFoundation' after macOS Big Sur update

Tags:

python

macos

Process: Python [1593] Path: /Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 3.5.1 (3.5.1) Code Type: X86-64 (Native) Parent Process: zsh [1569] Responsible: iTerm2 [1562] User ID: 501

Date/Time: 2020-11-21 08:15:58.865 +0800 OS Version: macOS 11.0.1 (20B29) Report Version: 12 Bridge OS Version: 5.0.1 (18P2561) Anonymous UUID: E76F7C18-1C08-D433-A979-D43ED08102AF

Sleep/Wake UUID: E8807548-2D08-4BC7-840E-21E0138FEC36

Time Awake Since Boot: 1400 seconds Time Since Wake: 210 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: DYLD, [0x1] Library missing

Application Specific Information: dyld: launch, loading dependent libraries

Dyld Error Message: dyld: No shared cache present Library not loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation Referenced from: /Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python Reason: image not found

Binary Images: 0x100000000 - 0x100000fff +org.python.python (3.5.1 - 3.5.1) <16087962-95EF-B9B7-A634-47CA97FED0B7> /Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python 0x7fff624d8000 - 0x7fff62573fff dyld (832.7.1) <2705F0D8-C104-3DE9-BEB5-B1EF6E28656D> /usr/lib/dyld

Model: MacBookPro15,2, BootROM 1554.50.3.0.0 (iBridge: 18.16.12561.0.0,0), 4 processors, Quad-Core Intel Core i5, 2.4 GHz, 16 GB, SMC Graphics: kHW_IntelIrisGraphics655Item, Intel Iris Plus Graphics 655, spdisplays_builtin Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, LPDDR3, 2133 MHz, SK Hynix, - Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, LPDDR3, 2133 MHz, SK Hynix, - AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x7BF), wl0: Sep 11 2020 16:57:49 version 9.30.440.2.32.5.61 FWID 01-129bddb Bluetooth: Version 8.0.1f5, 3 services, 18 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB 3.1 Bus USB Device: Apple T2 Bus USB Device: Touch Bar Backlight USB Device: Touch Bar Display USB Device: Apple Internal Keyboard / Trackpad USB Device: Headset USB Device: Ambient Light Sensor USB Device: FaceTime HD Camera (Built-in) USB Device: Apple T2 Controller Thunderbolt Bus: MacBook Pro, Apple Inc., 47.4 Thunderbolt Bus: MacBook Pro, Apple Inc., 47.4

like image 263
faronzz Avatar asked Nov 21 '20 00:11

faronzz


2 Answers

There shouldn't be the need to uninstall python3.5.

You can just remove it from your $PATH environment variable after you made sure you've installed the latest version via brew install python3.

If echo $PATH looks something the like:

echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/opt/X11/bin:/Library/Apple/usr/bin

Then just replace the entry /Library/Frameworks/Python.framework/Versions/3.5/bin with /usr/bin/python3 (the output of which python3). This is done via:

export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/bin/python3:/opt/X11/bin:/Library/Apple/usr/bin

Then it should look like this:

echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/bin/python3:/opt/X11/bin:/Library/Apple/usr/bin

This worked for me after having trouble executing pylint.

That was my source for this: https://www.ianmaddaus.com/post/manage-multiple-versions-python-mac/

like image 166
los_floppos Avatar answered Jan 01 '23 20:01

los_floppos


This worked for me.

brew uninstall python3
sudo rm -rf /Library/Frameworks/Python.framework
like image 40
nekolus Avatar answered Jan 01 '23 20:01

nekolus