File permissions issue with python/Spyder/Anaconda after upgrading mac to Catalina

前端 未结 5 568
萌比男神i
萌比男神i 2020-12-07 03:19

After upgrading macOS to Catalina, my Anaconda installation was helpfully reconfigured by Apple. Advice from the Anaconda website suggested a fresh install was the best way

5条回答
  •  情书的邮戳
    2020-12-07 03:52

    I guess you have solved this by now, but for future reference, I still post my answer.

    TLDR: I opened a file (from the folder causing the problem) directly in the spyder editor (File | open). As a consequence, the editor should have triggered the pop-up dialog question whether you want to allow access or not. In my case, the mac silently granted python/spyder access to the folder. Now I can run the code in spyder without more problems than I have caused myself.

    Longer version: The source of your problem is described here: https://www.howtogeek.com/443611/how-macos-catalinas-new-security-features-work/ Knowing that links are something frown upon, here's a summary: The problem is that the folders "Documents" and "Downloads" folders nowadays are protected and you would need to go to the security & privacy settings and "Files and Folder,s" and allow the applications to access these. Unfortunately, spyder does not show up here. So, if you want to run your python program from the terminal, you should probably grant the terminal access to the folders.

提交回复
热议问题