Python and Jupyter Notebook commands not working after upgrading to MacOS Ventura 13.4

125 Views Asked by At

I deleted XCode and upgraded my MacOS to Ventura 13.4. After these changes, I could not run jupyter notebook with command jupyter notebook or jupyter-notebook. The error is as follows:

dyld[9426]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed
dyld[9426]: Library not loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  Referenced from: <E585A67D-C0DB-448A-2E74-422D61BDC1C1> /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python
  Reason: tried:
 '/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation' (no such file), 
 '/System/Volumes/Preboot/Cryptexes/OS/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation' (no such file),
 '/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation' (no such file, no dyld cache),
 '/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation' (no such file)

I have several Python versions installed as well as Anaconda. If I run However, if I run python3 -m site then it gives the same error as above.

Based on the answer from this post, I tried removing the 3.6 from /Library/Framworks/Python.framework/Versions but it didn't work and showed errors as followed.

If I run jupyter notebook, it gives error

Error executing Jupyter command 'notebook': [Errno 2] No such file or directory

If I run jupyter-notebook, it gives error

-bash: /Users/<username>/Library/Python/3.6/bin/jupyter-notebook: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6: bad interpreter: No such file or directory

I was thinking it might be a issue related to PATH. Is there any method with which I can locate the issue and figure out the solution to solve the issue? Appreciate any help!

1

There are 1 best solutions below

1
Keith Anderson On

I had similar problems with python and postgres failing to run after upgrading to Ventura. This was fixed by opening XCode and following the prompts to upgrade XCode, which presumably upgraded/fixed various developer dependencies. So try running (or installing) XCode.