使用 PIP 安装 jupyterlab

Using PIP to install jupyterlab

所以我最近决定我想再做一次 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?我对这一切都很陌生,所以我不知道应该提供哪些正确的信息,所以我提供了我所看到的一切。

谢谢:)

要么通过 anaconda 完成:https://docs.anaconda.com/anaconda/install/index.html

或者,您似乎使用的是 Python 3.7。在这种情况下,建议使用 pip3。你试过了吗pip3 install jupyterlab