Conda: PermissionError: [Errno 13] Permission denied

Created on 16 Aug 2017  路  1Comment  路  Source: conda/conda

Sorry to bug you guys but I saw other similar issues. I basically can't install things unless I use sudo.
I'm wondering if its related to upgrading my mac os x -- now it has the SIP "rootless" part. But, I dont think it should matter since conda is installed in my /users folder?

I do notice that it says (read only) on my root environment but I dont know how to change that.

```Current conda install:

           platform : osx-64
      conda version : 4.3.23
   conda is private : False
  conda-env version : 4.3.23
conda-build version : not installed
     python version : 3.5.2.final.0
   requests version : 2.14.2
   root environment : /Users/Amar/miniconda3  (read only)
default environment : /Users/Amar/miniconda3
   envs directories : /Users/Amar/.conda/envs
                      /Users/Amar/miniconda3/envs
      package cache : /Users/Amar/miniconda3/pkgs
                      /Users/Amar/.conda/pkgs
       channel URLs : https://repo.continuum.io/pkgs/free/osx-64
                      https://repo.continuum.io/pkgs/free/noarch
                      https://repo.continuum.io/pkgs/r/osx-64
                      https://repo.continuum.io/pkgs/r/noarch
                      https://repo.continuum.io/pkgs/pro/osx-64
                      https://repo.continuum.io/pkgs/pro/noarch
        config file : None
         netrc file : None
       offline mode : False
         user-agent : conda/4.3.23 requests/2.14.2 CPython/3.5.2 Darwin/16.7.0 OSX/10.12.6    
            UID:GID : 501:20

$ /Users/Amar/miniconda3/bin/conda install sklearn pandas

Traceback (most recent call last):
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/exceptions.py", line 634, in conda_exception_handler
    return_value = func(*args, **kwargs)
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/cli/main.py", line 140, in _main
    exit_code = args.func(args, p)
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/cli/main_install.py", line 80, in execute
    install(args, parser, 'install')
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/cli/install.py", line 228, in install
    unknown=index_args['unknown'], prefix=prefix)
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/core/index.py", line 101, in get_index
    index = fetch_index(channel_priority_map, use_cache=use_cache)
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/core/index.py", line 120, in fetch_index
    repodatas = collect_all_repodata(use_cache, tasks)
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/core/repodata.py", line 74, in collect_all_repodata
    repodatas = _collect_repodatas_serial(use_cache, tasks)
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/core/repodata.py", line 479, in _collect_repodatas_serial
    for url, schan, pri in tasks]
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/core/repodata.py", line 479, in <listcomp>
    for url, schan, pri in tasks]
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/core/repodata.py", line 109, in func
    res = f(*args, **kwargs)
  File "/Users/Amar/miniconda3/lib/python3.5/site-packages/conda/core/repodata.py", line 467, in fetch_repodata
    with open(cache_path, 'w') as fo:
PermissionError: [Errno 13] Permission denied: '/Users/Amar/miniconda3/pkgs/cache/9ca791dd.json'

```

Most helpful comment

OK haha, I fixed it. It was what I thought.
I ran
sudo chown -R Amar /Users/Amar/miniconda3/

and now conda install works. Maybe I installed conda with root originally? I have no idea.

Anyways will close this.

>All comments

OK haha, I fixed it. It was what I thought.
I ran
sudo chown -R Amar /Users/Amar/miniconda3/

and now conda install works. Maybe I installed conda with root originally? I have no idea.

Anyways will close this.

Was this page helpful?
0 / 5 - 0 ratings