-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with permissions in macOS Catalina #11387
Comments
Please see this blog post for tips on Anaconda & Catalina: https://www.anaconda.com/how-to-restore-anaconda-after-macos-catalina-update/ |
I already did that. The problem is I made a clean installation and it doesn't work. |
It says "PermissionError" - do you have the appropriate permissions to access that directory in the terminal where you are running the command line installer? In other words, can you read/write/execute in the terminal in that directory separate from anything to do with the Anaconda installer. |
This seems to be a different problem introduced with MacOS Catalina where certain user folders are protected (Desktop/Documents/Downloads). According to Apple, your system is supposed to prompt you to request permission to those folders when access is needed. However that doesn't seem to apply to non-MacOS apps like the python interpreter, or shell commands run via terminal (for what it's worth, this problem also happens for the default python and terminal included with MacOS). One workaround you could try: With Spyder open, hit the open folder button in the top left corner (cmd + o). Once there, navigate to the folder that you need access to and try to open a file (in your case the Documents folder). Once that is done, re-run your code and see if the permissions error is still there. Would you be willing to try that and let us know if it solves your problem? |
I had similar problems, installed the new version, but Jupyter Lab cannot access Desktop and Documents if launched from the Navigator; if launched from the terminal the authorization question pops up and it works; so now Spyder, Notebook and VS Code are ok, but Jupyter Lab still needs to launched by the terminal. |
I run the command |
For me too. Have no problem with running from the command line but cannot run on Spyder from Anaconda-Navigator. The issue definitely has to do with the path manager. I was able to get one of my programs running by manually adding the path to PATHMANAGER and it worked. I since removed it. Restarted everything and it still remembers it. However I also set Documents/Downloads/Desktop (more generalized paths) and those do not work. No other program outside of the folder which my imports were located can be found. That now includes modules like Numpy. That was only a partial fix... I think I have a good one. So I reinstalled a 4th time. Using the command line installer. But this time I made sure to delete the ~/.<fille/folder> related to python. iPython, Spyder, conda, anaconda, bash_profile, etc. After reinstalling to the /User/<your_home folder>/ (not OPT). At this time I also switched to zsh so conda init zsh. Restart your terminal window. Open up Anaconda/Spyder. Then I installed your packages. There may still be some problems at this point if you look at the ~/.spyder-py3 there should be a directory called workingdir. This will hold all the valid paths. So when you run your program make sure it's "the default working directory is the directory where the file is being executed from" and "console directory is the current working directory". Then I started to run on my various programs. Expanded outwards. Now I am having no troubles with permissions or running in spyder or terminal. I have access to all modules. |
Solved: What I did I create a new folder I call it 'dev' in my user folder and moved all my files & folders in there, then the permission error disappeared. Hope this will help you as well. |
I did the same and it does solve the problem indeed, but not quite. For example you download some data into the Downloads folder and then use that location to import data via Spyder (pd.read_csv('...') and here again you have the same problem. First you have to move those downloads elsewhere then you can import them. I consider this a temporary workaround... |
I have granted "Full Disk Access" to Terminal and sh in Privacy settings and it worked. Details are here: |
I have uploaded a new Navigator package for OSX. Now when attempting to access these folders you should receive a prompt the first time requesting permission. You can update by running this from the terminal in the environment where you have anaconda-navigator installed:
Once updated, the easiest way I've found to generate the permissions prompt for Navigator for the first time is to open Spyder and run something like this in the console (can replace Desktop with Downloads/Documents folder depending which you need access to):
|
It works! I had a new computer with the same problem, updated navigator and the questions are asked for access to Anaconda-Navigator.app both in Spyder and JupyterLab (it asks again on each though). |
Thanks for testing @MarcosCarreira , glad that worked. |
Thanks for the fix. It does work as described. One thing though: it keeps asking for the permission over and over. So after the first permission is granted, it does access the folder, but keeps asking if again I try to access the same folder... This is all within a single Spyder (python console) session. Any thoughts on that? |
Unfortunately the new Catalina update broke it - I decided to not use these folders for any code whatsoever. |
Can't believe that it will stay like that! Anyone please update if you will find a fix for that. |
it worked for me. Thanks! |
This worked for me. I should add that simply navigating to the folder in question is insufficient to get Anaconda's Spyder to recognize that directory as readable by macOS Catalina. I needed to create a text file in the directory in question and actually open it in Spyder. After that, any file in that directory could be read. (My other files aren't actually .txt files or .py files, so I couldn't open them in Spyder.) |
Hello i have anaconda- navigator problem, it doesn't start. i tried to remove .anaconda once i launche the navigator the .anaconda folder restore. packages in environment at /Users/utilisateur/anaconda3:Name Version Build Channel_ipyw_jlab_nb_ext_conf 0.1.0 py38_0 |
hello i found my problem i had to go to "https://docs.anaconda.com/anaconda/install/#old-os" and choose the right version to my mac os on anaconda archive "https://repo.anaconda.com/archive/" good luck. |
Actual Behavior
I upgrade macOS to Catalina. The problem is that now, I can't read any file. I tried to reinstall Anaconda but it doesn't work. I also reinstall the OS. When I run gives me this error:
Steps to Reproduce
I upgrade to macOS Catalina and I made a clean install with the command line installer.
Anaconda or Miniconda version:
Anaconda3
Operating System:
macOS Catalina
The text was updated successfully, but these errors were encountered: