简体   繁体   中英

Python3.4 installation erroring out on MacOS Big Sur

After installing python 3.4.3 and on running the command python3.4, it gives an error:

dyld: Library not loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python
  Reason: image not found

I found a solution to the above problem. It can be done using pyenv manager installed using brew instead of using default pkg installer.

You might face few errors in that too like: implicit declaration of function 'getentropy' is invalid in C99

Those errors can be avoided by using a patch. Patch link

Following this entire link should help you in getting Python 3.4.x running in BigSur.

(2022 update) The patch isn't enough, as explained later in the thread . Instead:

  1. Save the updated patch locally.

  2. Run the following 2 commands:

brew uninstall --ignore-dependencies --force openssl

brew reinstall zlib

  1. Replace Python-3.4.3-macos.patch with the path to your saved patch, and run:
 CPPFLAGS="-I/usr/local/opt/zlib/include -I$(brew --prefix readline)/include" LDFLAGS="-L$(brew --prefix readline)/lib -L/usr/local/opt/zlib/lib" pyenv install 3.4.3 --patch < Python-3.4.3-macos.patch

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM