pythonmacospipdyld

Using PIP to install jupyterlab


So I recently decided that I wanted to do Python again but this time I wanted it for AI, so I ended up wanting to use Jupyter Notebook. However, when I use the command pip install jupyterlab, it gives me the following error.

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

So I decided to check my echo $PATH and I got this

/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

So what I understood from this is that my system is using python 3.9? <- I'm not sure about this to be completely honest. Going back to the pip install jupyterlab it gives another error in which is gives me this

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

All in all how do I use pip to install Jupyterlab? I am very new to all this so I didn't know what the right information was to give so I gave everything I saw.

Thank you :)


Solution

  • Either you do it through anaconda: https://docs.anaconda.com/anaconda/install/index.html

    Or, it seems you are using Python 3.7. It is recommended to use pip3 in that case. Have you tried pip3 install jupyterlab?