【发布时间】:2023-03-20 02:10:01
【问题描述】:
所以我最近决定再次使用 Python,但这次我想将它用于 AI,所以我最终想使用 Jupyter Notebook。但是,当我使用命令pip install jupyterlab 时,它给了我以下错误。
dyld: Library not loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation Referenced from: /Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python Reason: image not found zsh: abort pip install notebook
所以我决定检查我的echo $PATH 并得到了这个
/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
所以我从中了解到我的系统使用的是python 3.9? pip install jupyterlab,它给出了另一个错误,它给了我这个
Process: Python [5911]
Path: /Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.7.6 (3.7.6)
Code Type: X86-64 (Native)
Parent Process: zsh [5755]
Responsible: Terminal [4007]
User ID: 501
Date/Time: 2021-09-15 09:34:31.540 -0400
OS Version: macOS 11.4 (20F71)
Report Version: 12
Bridge OS Version: 5.4 (18P4663)
Anonymous UUID: 97B6C1B1-F670-238C-FB42-76BAB028DC08
Sleep/Wake UUID: 9DA5F457-58C0-4989-8702-A75276E1B82F
Time Awake Since Boot: 30000 seconds
Time Since Wake: 3000 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.7/Resources/Python.app/Contents/MacOS/Python
Reason: image not found
Binary Images:
0x100000000 - 0x100000fff +org.python.python (3.7.6 - 3.7.6) <266DE8C4-14E3-83DB-D4C7-E809D96C1A79> /Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
0x7fff61bc9000 - 0x7fff61c64fff dyld (852) <1AC76561-4F9A-34B1-BA7C-4516CACEAED7> /usr/lib/dyld
总而言之,我如何使用 pip 安装 Jupyterlab?我对这一切都很陌生,所以我不知道应该提供什么正确的信息,所以我提供了我所看到的一切。
谢谢你:)
【问题讨论】:
-
您是否安装了开发者工具?
xcode-select --install -
注意:例如,Google colab 提供在线、免费的 jupyter 环境,因此您无需在本地安装东西
-
您是否尝试过使用
pip3而不是pip?推荐用于 Python 3+。 -
我不确定如何检查。但是你会推荐我安装吗?
-
pip3确实有效,谢谢@TanguyH