faronzz
faronzz

Reputation: 119

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

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

Upvotes: 11

Views: 15305

Answers (4)

nekolus
nekolus

Reputation: 43

This worked for me.

brew uninstall python3
sudo rm -rf /Library/Frameworks/Python.framework

Upvotes: 2

los_floppos
los_floppos

Reputation: 153

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/

Upvotes: 5

Yuncheng Yang
Yuncheng Yang

Reputation: 11

It is okay to use python 3.8, as it is backward compatible. So I have just deleted the old venv and created a new venv with current python version, which solved my problem.

tip: Remember to save your requirements into a txt file.

reference: https://realpython.com/lessons/cool-new-features-python-38-overview/

Upvotes: 1

Tushar Vatsal
Tushar Vatsal

Reputation: 39

This also happened to me when I was trying to run python3 from iTerm (replacement of terminal). This problem was not occurring with the MacBook's default terminal. After I updated iTerm, this error was not occurring anymore. Please try to update the application on which you are trying to run python3(in my case it was iTerm) instead of updating the python version.

Upvotes: -6

Related Questions