1

I recently upgrade to macOS Catalina and I made a clean installation Anaconda Navigator. I install again Anaconda but it didn't work. I also reinstall the OS but didn't work too. The permissions of the files are ok, I can read and write files. I don't know why I can't open a file from Spyder. This is the image of my terminal in Spyder:

enter image description here

5
  • @klanomath I add an image. Commented Oct 22, 2019 at 18:26
  • I tested Anaconda 2019.10 Python3,7 in a 10.15 VM yesterday and had no problems to run self-made code..... Now I'd have to get 2019_Twitter... somehow. Is it available online somewhere?
    – klanomath
    Commented Oct 22, 2019 at 18:40
  • Possible duplicate of Restore Access to File System for Emacs on MacOS Catalina
    – anki
    Commented Oct 22, 2019 at 18:43
  • @ankii In fact it's somehow related to the linked q&a, but it's almost impossible to set some allow-file-read-exec policy for all files/execs involved. So I have written another answer...
    – klanomath
    Commented Oct 22, 2019 at 22:00
  • @klanomath I intended to leave it as a comment for related questions, but went for duplicate. It serves the purpose, while having another benefit of community's (and OP's) response.
    – anki
    Commented Oct 22, 2019 at 22:03

1 Answer 1

3

The problems observed are related to the new system policy for user owned "system folders" like Documents, Desktop etc.

Here is a related syslog entry me trying to execute or open some script/file in $USER/Documents/ with Spyder/iPython:

Sandbox: python(2233) System Policy: deny(1) file-read-data /Users/admin/Documents
Violation:       System Policy: deny(1) file-read-data /Users/admin/Documents 
Process:         python [2233]
Path:            /Users/admin/opt/anaconda3/python.app/Contents/MacOS/python
Load Address:    0x103cbc000
Identifier:      com.continuum.python
Version:         ??? (???)
Code Type:       x86_64 (Native)
Parent Process:  bash [2232]
Responsible:     /bin/sh [/Users/admin/opt/anaconda3/Anaconda-Navigator.app/Contents/MacOS/run.sh]
User ID:         501

I had no problems to execute scripts in subfolders of Documents though.

One may add an executable to System Preferences > Security & Privacy > Privacy > Full disk access (see this q&a), but since too many execs may be involved, it's much simpler to create a new folder (e.g Development, Dev, Anaconda-Dev etc.) in your user folder and move your dev files & folders in there. The permission errors should disappear afterwards.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .