Conda: windows 10 windowserror error 5 access denied

Created on 15 Jun 2016  Â·  60Comments  Â·  Source: conda/conda

I've installed Anaconda on Windows 10, and now I'm trying to create an environment for python 3.5 using the follwoing comand: conda create -n py35 python=3.5 anaconda

Also tried: conda create -n py35 python=3.5

And I tried running as admin. Also tried rebooting. In all cases I get:

An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:

https://github.com/conda/conda/issues

Include the output of the command 'conda info' in your report.

Current conda install:

         platform : win-64
    conda version : 4.1.0

conda-build version : 1.20.0
python version : 2.7.11.final.0
requests version : 2.9.1
root environment : C:\Users\mbinj\Anaconda2 (writable)
default environment : C:\Users\mbinj\Anaconda2
envs directories : C:\Users\mbinj\Anaconda2\envs
package cache : C:\Users\mbinj\Anaconda2\pkgs
channel URLs : https://repo.continuum.io/pkgs/free/win-64/
https://repo.continuum.io/pkgs/free/noarch/
https://repo.continuum.io/pkgs/pro/win-64/
https://repo.continuum.io/pkgs/pro/noarch/
config file : None
is foreign system : False

Traceback (most recent call last):
File "C:\Users\mbinj\Anaconda2\Scripts\conda-script.py", line 5, in
sys.exit(main())
File "C:\Users\mbinj\Anaconda2\lib\site-packages\conda\cli\main.py", line 120, in main
args_func(args, p)
File "C:\Users\mbinj\Anaconda2\lib\site-packages\conda\cli\main.py", line 127, in args_func
args.func(args, p)
File "C:\Users\mbinj\Anaconda2\lib\site-packages\conda\cli\main_create.py", line 57, in execute
install(args, parser, 'create')
File "C:\Users\mbinj\Anaconda2\lib\site-packages\conda\cli\install.py", line 407, in install
execute_actions(actions, index, verbose=not args.quiet)
File "C:\Users\mbinj\Anaconda2\lib\site-packages\conda\plan.py", line 566, in execute_actions
inst.execute_instructions(plan, index, verbose)
File "C:\Users\mbinj\Anaconda2\lib\site-packages\conda\instructions.py", line 137, in execute_instructions
cmd(state, arg)
File "C:\Users\mbinj\Anaconda2\lib\site-packages\conda\instructions.py", line 60, in EXTRACT_CMD
extract(arg)
File "C:\Users\mbinj\Anaconda2\lib\site-packages\conda\install.py", line 821, in extract
os.rename(temp_path, path)
WindowsError: [Error 5] Access is denied

type-bug

Most helpful comment

The reason this came back is related to https://github.com/conda/conda/pull/3698. I messed up on the fix. Will have a PR shortly.

All 60 comments

I am running Windows 7 and get a similar error when executing the update command:

conda update anaconda

and I ran as an administrator. Here is the traceback:

Proceed ([y]/n)? y

Extracting packages ...
An unexpected error has occurred, please consider sending the            |  21%
following traceback to the conda GitHub issue tracker at:

    https://github.com/conda/conda/issues

Include the output of the command 'conda info' in your report.


Traceback (most recent call last):
  File "C:\Users\Alan\Anaconda\Scripts\conda-script.py", line 5, in <module>
    sys.exit(main())
  File "C:\Users\Alan\Anaconda\lib\site-packages\conda\cli\main.py", line 120, in main
    args_func(args, p)
  File "C:\Users\Alan\Anaconda\lib\site-packages\conda\cli\main.py", line 127, in args_func
    args.func(args, p)
  File "C:\Users\Alan\Anaconda\lib\site-packages\conda\cli\main_update.py", line 64, in execute
    install(args, parser, 'update')
  File "C:\Users\Alan\Anaconda\lib\site-packages\conda\cli\install.py", line 407, in install
    execute_actions(actions, index, verbose=not args.quiet)
  File "C:\Users\Alan\Anaconda\lib\site-packages\conda\plan.py", line 566, in execute_actions
    inst.execute_instructions(plan, index, verbose)
  File "C:\Users\Alan\Anaconda\lib\site-packages\conda\instructions.py", line 137, in execute_instructions
    cmd(state, arg)
  File "C:\Users\Alan\Anaconda\lib\site-packages\conda\instructions.py", line 60, in EXTRACT_CMD
    extract(arg)
  File "C:\Users\Alan\Anaconda\lib\site-packages\conda\install.py", line 821, in extract
    os.rename(temp_path, path)
WindowsError: [Error 5] Access is denied

And here is conda info:

Current conda install:

             platform : win-64
        conda version : 4.1.0
  conda-build version : 1.11.0
       python version : 2.7.11.final.0
     requests version : 2.9.1
     root environment : C:\Users\Alan\Anaconda  (writable)
  default environment : C:\Users\Alan\Anaconda
     envs directories : C:\Users\Alan\Anaconda\envs
        package cache : C:\Users\Alan\Anaconda\pkgs
         channel URLs : https://repo.continuum.io/pkgs/free/win-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/win-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : None
    is foreign system : False

@maien85, @alanmitchell are you running a virus scanner or any background search processes? I want to reproduce this issue and running the same software will help with that, so if you could give as much detail as possible that would be great.

Same for me. Windows 10; 64 bit.

Cannot install/update any package or create any environment. Problem appeared out of a sudden, just updated conda after not using for a while. Fails with error like that:

Traceback (most recent call last):
  File "C:\Users\andre\Anaconda3\Scripts\conda-script.py", line 5, in 
    sys.exit(main())
  File "C:\Users\andre\Anaconda3\lib\site-packages\conda\cli\main.py", line 120, in main
    args_func(args, p)
  File "C:\Users\andre\Anaconda3\lib\site-packages\conda\cli\main.py", line 127, in args_func
    args.func(args, p)
  File "C:\Users\andre\Anaconda3\lib\site-packages\conda\cli\main_update.py", line 64, in execute
    install(args, parser, 'update')
  File "C:\Users\andre\Anaconda3\lib\site-packages\conda\cli\install.py", line 407, in install
    execute_actions(actions, index, verbose=not args.quiet)
  File "C:\Users\andre\Anaconda3\lib\site-packages\conda\plan.py", line 566, in execute_actions
    inst.execute_instructions(plan, index, verbose)
  File "C:\Users\andre\Anaconda3\lib\site-packages\conda\instructions.py", line 137, in execute_instructions
    cmd(state, arg)
  File "C:\Users\andre\Anaconda3\lib\site-packages\conda\instructions.py", line 60, in EXTRACT_CMD
    extract(arg)
  File "C:\Users\andre\Anaconda3\lib\site-packages\conda\install.py", line 821, in extract
    os.rename(temp_path, path)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\andre\\Anaconda3\\pkgs\\mkl-11.3.3-1.tmp' -> 'C:\\Users\\andre\\Anaconda3\\pkgs\\mkl-11.3.3-1'

Following methods did not help: reboot; running cmd/navigator as admin; deleting/reinstalling from scratch (many times, with different installation options).

I noticed that all unpacked package directories have read-only flag. However, I tried adding win32api.SetFileAttributes(temp_path, win32con.FILE_ATTRIBUTE_NORMAL) or os.chmod(temp_path, stat.S_IWRITE) to install.py (right before renaming), but neither worked - the error just stayed the same.

C:\Users\andre>conda info
Current conda install:
             platform : win-64
        conda version : 4.1.0
  conda-build version : 1.20.0
       python version : 3.5.1.final.0
     requests version : 2.9.1
     root environment : C:\Users\andre\Anaconda3  (writable)
  default environment : C:\Users\andre\Anaconda3
     envs directories : C:\Users\andre\Anaconda3\envs
        package cache : C:\Users\andre\Anaconda3\pkgs
         channel URLs : https://repo.continuum.io/pkgs/free/win-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/win-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : None
    is foreign system : False

Can anyone remember the options they selected when they installed Anaconda? Looking at the folders in the backtraces, I'm guessing you all installed it for Just Me, but did you select either of Add Anaconda to my PATH environment variable or Register Anaconda as my default Python 3.5?

Reinstalled a few times.

Just me mainly, but tried other option as well.

Both yes for Add Anaconda to my PATH environment variable and Register Anaconda as my default Python 3.5

I've still not managed to reproduce any of the issues. Are you running virus scanners or any other file-system indexing/searching programs?

I have Avira antivirus. It seems, I also did not uninstall McAfee after subscription expired :-Z

I reinstalled Anaconda on another hard drive instead of system drive C:, and suddenly it could update all. Same Anaconda installer file as yesterday. However, creating new environment still fails. Installing new packages also still fails. Same error.

And updates stopped working too. I was able to run "conda update --all" once, but that was it.

Which version of Avira antivirus are you running?

Product version 15.0.17.273 4/4/2016
Search engine 8.03.40.44 6/9/2016
Virus definition file 8.12.99.194 6/16/2016
Control Center 15.00.17.264 5/13/2016
Config Center 15.00.17.264 5/13/2016
Luke Filewalker 15.00.17.264 5/13/2016
Real-Time Protection 15.00.17.264 5/13/2016
Filter 15.00.16.222 2/22/2016
Web Protection 15.00.17.271 5/13/2016
Scheduler 15.00.17.264 5/13/2016
Updater 15.00.17.264 5/13/2016
Rootkits Protection 15.00.17.269 5/13/2016
Local Decider 15.00.17.264 5/13/2016

If it helps reproduction: it seems that conda update --all and creating environments often cause troubles, but not always do that.

Just installed Anaconda from scratch. Was able to run conda update and it kept working. Was able to install things from navigator and command line just fine. Creating Python 2.7 environment from command line failed with that error and ended up kind of half-created - visible in navigator, but had only 1 package (menuinst). Luckily, it was fixed with activate Python2 + conda install anaconda.

To summarize, both environments work for me now. Still I can assist with reproduction if necessary.

I was too quick to say that Python2 environment was fixed. Had to create another Python 2.7 environment from scratch. It worked this time, but I can't remove broken Python2 environment.

C:\Users\andre>conda-env remove -n Python2
Fetching package metadata .......
An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:
    https://github.com/conda/conda/issues
Include the output of the command 'conda info' in your report.
Traceback (most recent call last):
  File "E:\Tools\Anaconda3\Scripts\conda-env-script.py", line 5, in 
    sys.exit(conda_env.cli.main.main())
  File "E:\Tools\Anaconda3\lib\site-packages\conda_env\cli\main.py", line 68, in main
    return args_func(args, parser)
  File "E:\Tools\Anaconda3\lib\site-packages\conda\cli\main.py", line 127, in args_func
    args.func(args, p)
  File "E:\Tools\Anaconda3\lib\site-packages\conda_env\cli\main_remove.py", line 73, in execute
    plan.PREFIX: prefix,
AttributeError: module 'conda.plan' has no attribute 'PREFIX'

@mingwandroid I am using McAfee LifeSafe. No difference when I switched both the firewall and anti-spam off.
When I installed, I chose: Just me. And clicked on yes for both options that you mentioned.
I also tried installing anaconda on a D: drive, but nothing has changed.

Not sure about any other background search processes.

Would it be possible to try my pull request?

fixed in #2717 (hopefully)

Reinstalled Anaconda from scratch, then conda update conda, then replaced install.py with your file.

Error is gone. Thanks!

Did the same as @andreyboytsov and it worked. Many thanks to @mingwandroid!

No problem, thanks for the confirmation guys.

@maien85, I know this issue is closed and a couple of weeks old, but... by any chance do you run a virus scanner, like Windows Defender or McAfee?

Oops, should have scrolled up.

Hello everyone,

sorry to revive that but I am experiencing the exact same error using the latest version of Anaconda. Given that this issue has been fixed, what was the cause of it?

Maybe some bogus file somewhere? I have installed anaconda many, many times on my computer (I dont have admin rights there) and anaconda is failing for the first time now.

@randomgambit Perhaps, those who actually worked on that problem can correct me. As I remember, there was some problem with moving files during package installation. If it failed once (e.g. due to file being scanned or indexed at the moment), all installation failed immediately. It was fixed by adding some retry mechanisms.

Just tried 'conda update --all'. Was OK for me.

thanks! but the point is, i would like to get the latest pandas version (v.19) which, for some reason, is not available when I use conda update --all.

So I type conda update pandas and I run into the error when the package starts unpacking...

@randomgambit Reproduced when installing pandas on Python2 env.

Linking packages ...
An unexpected error has occurred.                                        |   0%
Please consider posting the following information to the
conda GitHub issue tracker at:
    https://github.com/conda/conda/issues
Current conda install:
               platform : win-64
          conda version : 4.2.11
       conda is private : False
      conda-env version : 4.2.11
    conda-build version : 2.0.7
         python version : 3.5.2.final.0
       requests version : 2.11.1
       root environment : E:\Tools\Anaconda3  (writable)
    default environment : E:\Tools\Anaconda3\envs\Python2
       envs directories : E:\Tools\Anaconda3\envs
          package cache : E:\Tools\Anaconda3\pkgs
           channel URLs : https://repo.continuum.io/pkgs/free/win-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/pro/win-64
                          https://repo.continuum.io/pkgs/pro/noarch
                          https://repo.continuum.io/pkgs/msys2/win-64
                          https://repo.continuum.io/pkgs/msys2/noarch
            config file : None
           offline mode : False
`$ E:\Tools\Anaconda3\Scripts\conda-script.py update pandas`
    Traceback (most recent call last):
      File "E:\Tools\Anaconda3\lib\site-packages\conda\exceptions.py", line 479, in conda_exception_handler
        return_value = func(*args, **kwargs)
      File "E:\Tools\Anaconda3\lib\site-packages\conda\cli\main.py", line 145, in _main
        exit_code = args.func(args, p)
      File "E:\Tools\Anaconda3\lib\site-packages\conda\cli\main_update.py", line 65, in execute
        install(args, parser, 'update')
      File "E:\Tools\Anaconda3\lib\site-packages\conda\cli\install.py", line 405, in install
        execute_actions(actions, index, verbose=not context.quiet)
      File "E:\Tools\Anaconda3\lib\site-packages\conda\plan.py", line 643, in execute_actions
        inst.execute_instructions(plan, index, verbose)
      File "E:\Tools\Anaconda3\lib\site-packages\conda\instructions.py", line 134, in execute_instructions
        cmd(state, arg)
      File "E:\Tools\Anaconda3\lib\site-packages\conda\instructions.py", line 87, in SYMLINK_CONDA_CMD
        symlink_conda(state['prefix'], arg)
      File "E:\Tools\Anaconda3\lib\site-packages\conda\install.py", line 536, in symlink_conda
        symlink_conda_hlp(prefix, root_dir, where, symlink_fn)
      File "E:\Tools\Anaconda3\lib\site-packages\conda\install.py", line 553, in symlink_conda_hlp
        symlink_fn(root_file, prefix_file)
      File "E:\Tools\Anaconda3\lib\site-packages\conda\install.py", line 119, in win_conda_bat_redirect
        with open(dst, "w") as f:
    PermissionError: [Errno 13] Permission denied: 'E:\\Tools\\Anaconda3\\envs\\Python2\\Scripts\\conda'
[      COMPLETE      ]|##################################################| 100%
(Python2)

The reason this came back is related to https://github.com/conda/conda/pull/3698. I messed up on the fix. Will have a PR shortly.

What I just said, ^^^^ I take it back. Not the same thing.

OH MAN! this error drove me CRAZY today ! thanks for helping! :D you will distribute a new version of anaconda?

@andreyboytsov You have a general permissions error I think. errno 5 != errno 13
We're working on a 4.3 release that will have better messaging and (hopefully) prevent you from getting into this state to begin with.

thanks. what is weird is that I was able to conda install fuzzywuzzy for instance. but as soon as I tried conda update pandas I ran into this weird permission errors.

@randomgambit Some of the discussion in https://github.com/conda/conda/issues/3664 is relevant. Windows file locking is a P.I.T.A. That may be what your problem is. The problem is that virus scanners and auto-backup systems are checking out locks on conda's files before conda is done with them. Installing larger packages one-at-a-time sometimes helps. So does (gasp) temporarily disabling your virus scanner. Obviously, do so at your own risk.

Ultimately, conda just needs to hold the file lock longer and not give it up until it's actually done with the file.

thanks @kalefranz . I will try tomorrow again with a fresh anaconda install and put the command line output.

last, my understanding is that it has to do with the latest anaconda version and maybe pandas itself. I used the same exact computer and installation folder at least 10 times before! (behind firewall, so sometimes the easiest solution to update a package is to reinstall the whole anaconda distrib!)

These lock problems are spurious, but I see reports often. This file locking happens at the OS/kernel layer. I wish Windows would give me a way to know and communicate to users "Norton Antivirus has held a lock on this file for the last 30 seconds and refuses to give it up." :-/

@kalefranz I tried again this morning. update --all works, but updating pandas causes an error during extraction

(C:\Users\john\AppData\Local\Continuum\Anaconda2) C:\Users\john>conda info

Current conda install:

               platform : win-64
          conda version : 4.2.11
       conda is private : False
      conda-env version : 4.2.11
    conda-build version : 2.0.7
         python version : 2.7.12.final.0
       requests version : 2.11.1
       root environment : C:\Users\john\AppData\Local\Continuum\Anaconda2  (w
ritable)
    default environment : C:\Users\john\AppData\Local\Continuum\Anaconda2
       envs directories : C:\Users\john\AppData\Local\Continuum\Anaconda2\env
s
          package cache : C:\Users\john\AppData\Local\Continuum\Anaconda2\pkg
s
           channel URLs : https://repo.continuum.io/pkgs/free/win-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/pro/win-64
                          https://repo.continuum.io/pkgs/pro/noarch
                          https://repo.continuum.io/pkgs/msys2/win-64
                          https://repo.continuum.io/pkgs/msys2/noarch
            config file : C:\Users\john\.condarc
           offline mode : False


(C:\Users\john\AppData\Local\Continuum\Anaconda2) C:\Users\john>

(C:\Users\john\AppData\Local\Continuum\Anaconda2) C:\Users\john>conda upda
te --all
Fetching package metadata .........
Solving package specifications: ..........

Package plan for installation in environment C:\Users\john\AppData\Local\Cont
inuum\Anaconda2:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-env-2.6.0            |                0          498 B
    conda-4.2.11               |           py27_0         459 KB
    conda-build-2.0.7          |           py27_0         330 KB
    ------------------------------------------------------------
                                           Total:         789 KB

The following NEW packages will be INSTALLED:

    conda-env:   2.6.0-0

The following packages will be UPDATED:

    conda:       4.2.9-py27_0 --> 4.2.11-py27_0
    conda-build: 2.0.2-py27_0 --> 2.0.7-py27_0

Proceed ([y]/n)? y

Fetching packages ...
conda-env-2.6. 100% |###############################| Time: 0:00:00 124.50 kB/s
conda-4.2.11-p 100% |###############################| Time: 0:00:00   7.58 MB/s
conda-build-2. 100% |###############################| Time: 0:00:00   6.89 MB/s
Extracting packages ...
[      COMPLETE      ]|##################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|##################################################| 100%
Linking packages ...
[      COMPLETE      ]|##################################################| 100%

(C:\Users\john\AppData\Local\Continuum\Anaconda2) C:\Users\john>conda upda
te pandas
Fetching package metadata .........
Solving package specifications: ..........

Package plan for installation in environment C:\Users\john\AppData\Local\Cont
inuum\Anaconda2:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    anaconda-custom            |           py27_0          13 KB
    pandas-0.19.0              |      np111py27_0         7.0 MB
    ------------------------------------------------------------
                                           Total:         7.0 MB

The following packages will be UPDATED:

    anaconda: 4.2.0-np111py27_0  --> custom-py27_0
    pandas:   0.18.1-np111py27_0 --> 0.19.0-np111py27_0

Proceed ([y]/n)? y

Fetching packages ...
anaconda-custo 100% |###############################| Time: 0:00:00   1.25 MB/s
pandas-0.19.0- 100% |###############################| Time: 0:00:00   9.65 MB/s
Extracting packages ...
An unexpected error has occurred.###############                         |  50%
Please consider posting the following information to the
conda GitHub issue tracker at:

    https://github.com/conda/conda/issues



Current conda install:

               platform : win-64
          conda version : 4.2.11
       conda is private : False
      conda-env version : 4.2.11
    conda-build version : 2.0.7
         python version : 2.7.12.final.0
       requests version : 2.11.1
       root environment : C:\Users\john\AppData\Local\Continuum\Anaconda2  (w
ritable)
    default environment : C:\Users\john\AppData\Local\Continuum\Anaconda2
       envs directories : C:\Users\john\AppData\Local\Continuum\Anaconda2\env
s
          package cache : C:\Users\john\AppData\Local\Continuum\Anaconda2\pkg
s
           channel URLs : https://repo.continuum.io/pkgs/free/win-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/pro/win-64
                          https://repo.continuum.io/pkgs/pro/noarch
                          https://repo.continuum.io/pkgs/msys2/win-64
                          https://repo.continuum.io/pkgs/msys2/noarch
            config file : C:\Users\john\.condarc
           offline mode : False



`$ C:\Users\john\AppData\Local\Continuum\Anaconda2\Scripts\conda-script.py up
date pandas`




    Traceback (most recent call last):
      File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\exceptions.py", line 479, in conda_exception_handler
        return_value = func(*args, **kwargs)
      File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\cli\main.py", line 145, in _main
        exit_code = args.func(args, p)
      File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\cli\main_update.py", line 65, in execute
        install(args, parser, 'update')
      File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\cli\install.py", line 405, in install
        execute_actions(actions, index, verbose=not context.quiet)
      File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\plan.py", line 643, in execute_actions
        inst.execute_instructions(plan, index, verbose)
      File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\instructions.py", line 134, in execute_instructions
        cmd(state, arg)
      File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\instructions.py", line 58, in EXTRACT_CMD
        extract(arg)
      File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\install.py", line 807, in extract
        exp_backoff_fn(os.rename, temp_path, path)
      File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\common\disk.py", line 155, in exp_backoff_fn
        result = fn(*args, **kwargs)
    WindowsError: [Error 5] Access is denied


(C:\Users\john\AppData\Local\Continuum\Anaconda2) C:\Users\john>

This is definitely the windows file lock issue. I wish I had more to tell you other than what I've already said. Conda just needs to hole these locks longer on Windows, but that's going to take a fairly invasive re-architecting of conda's internal flow. It's something we intend to do, but it's not happening by tomorrow :-/

On Oct 26, 2016, at 12:27 PM, Olaf [email protected] wrote:

@kalefranz I tried again this morning. update --all works, but updating pandas causes an error during extraction

(C:\Users\john\AppData\Local\Continuum\Anaconda2) C:\Users\john>conda info

Current conda install:

           platform : win-64
      conda version : 4.2.11
   conda is private : False
  conda-env version : 4.2.11
conda-build version : 2.0.7
     python version : 2.7.12.final.0
   requests version : 2.11.1
   root environment : C:\Users\john\AppData\Local\Continuum\Anaconda2  (w

ritable)
default environment : C:\Users\john\AppData\Local\Continuum\Anaconda2
envs directories : C:\Users\john\AppData\Local\Continuum\Anaconda2\env
s
package cache : C:\Users\john\AppData\Local\Continuum\Anaconda2\pkg
s
channel URLs : https://repo.continuum.io/pkgs/free/win-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/pro/win-64
https://repo.continuum.io/pkgs/pro/noarch
https://repo.continuum.io/pkgs/msys2/win-64
https://repo.continuum.io/pkgs/msys2/noarch
config file : C:\Users\john.condarc
offline mode : False

(C:\Users\john\AppData\Local\Continuum\Anaconda2) C:\Users\john>

(C:\Users\john\AppData\Local\Continuum\Anaconda2) C:\Users\john>conda upda
te --all
Fetching package metadata .........
Solving package specifications: ..........

Package plan for installation in environment C:\Users\john\AppData\Local\Cont
inuum\Anaconda2:

The following packages will be downloaded:

| package | build |
| --- | --- |
| conda-env-2.6.0 | 0 498 B |
| conda-4.2.11 | py27_0 459 KB |
| conda-build-2.0.7 | py27_0 330 KB |

------------------------------------------------------------
                                       Total:         789 KB

The following NEW packages will be INSTALLED:

conda-env:   2.6.0-0

The following packages will be UPDATED:

conda:       4.2.9-py27_0 --> 4.2.11-py27_0
conda-build: 2.0.2-py27_0 --> 2.0.7-py27_0

Proceed ([y]/n)? y

Fetching packages ...
conda-env-2.6. 100% |###############################| Time: 0:00:00 124.50 kB/s
conda-4.2.11-p 100% |###############################| Time: 0:00:00 7.58 MB/s
conda-build-2. 100% |###############################| Time: 0:00:00 6.89 MB/s
Extracting packages ...
[ COMPLETE ]|##################################################| 100%
Unlinking packages ...
[ COMPLETE ]|##################################################| 100%
Linking packages ...
[ COMPLETE ]|##################################################| 100%

(C:\Users\john\AppData\Local\Continuum\Anaconda2) C:\Users\john>conda upda
te pandas
Fetching package metadata .........
Solving package specifications: ..........

Package plan for installation in environment C:\Users\john\AppData\Local\Cont
inuum\Anaconda2:

The following packages will be downloaded:

| package | build |
| --- | --- |
| anaconda-custom | py27_0 13 KB |
| pandas-0.19.0 | np111py27_0 7.0 MB |

------------------------------------------------------------
                                       Total:         7.0 MB

The following packages will be UPDATED:

anaconda: 4.2.0-np111py27_0  --> custom-py27_0
pandas:   0.18.1-np111py27_0 --> 0.19.0-np111py27_0

Proceed ([y]/n)? y

Fetching packages ...
anaconda-custo 100% |###############################| Time: 0:00:00 1.25 MB/s
pandas-0.19.0- 100% |###############################| Time: 0:00:00 9.65 MB/s
Extracting packages ...
An unexpected error has occurred.############### | 50%
Please consider posting the following information to the
conda GitHub issue tracker at:

https://github.com/conda/conda/issues

Current conda install:

           platform : win-64
      conda version : 4.2.11
   conda is private : False
  conda-env version : 4.2.11
conda-build version : 2.0.7
     python version : 2.7.12.final.0
   requests version : 2.11.1
   root environment : C:\Users\john\AppData\Local\Continuum\Anaconda2  (w

ritable)
default environment : C:\Users\john\AppData\Local\Continuum\Anaconda2
envs directories : C:\Users\john\AppData\Local\Continuum\Anaconda2\env
s
package cache : C:\Users\john\AppData\Local\Continuum\Anaconda2\pkg
s
channel URLs : https://repo.continuum.io/pkgs/free/win-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/pro/win-64
https://repo.continuum.io/pkgs/pro/noarch
https://repo.continuum.io/pkgs/msys2/win-64
https://repo.continuum.io/pkgs/msys2/noarch
config file : C:\Users\john.condarc
offline mode : False

$ C:\Users\john\AppData\Local\Continuum\Anaconda2\Scripts\conda-script.py up date pandas

Traceback (most recent call last):
  File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages

\conda\exceptions.py", line 479, in conda_exception_handler
return_value = func(_args, *_kwargs)
File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\cli\main.py", line 145, in _main
exit_code = args.func(args, p)
File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\cli\main_update.py", line 65, in execute
install(args, parser, 'update')
File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\cli\install.py", line 405, in install
execute_actions(actions, index, verbose=not context.quiet)
File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\plan.py", line 643, in execute_actions
inst.execute_instructions(plan, index, verbose)
File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\instructions.py", line 134, in execute_instructions
cmd(state, arg)
File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\instructions.py", line 58, in EXTRACT_CMD
extract(arg)
File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\install.py", line 807, in extract
exp_backoff_fn(os.rename, temp_path, path)
File "C:\Users\john\AppData\Local\Continuum\Anaconda2\lib\site-packages
\conda\common\disk.py", line 155, in exp_backoff_fn
result = fn(_args, *_kwargs)
WindowsError: [Error 5] Access is denied

(C:\Users\john\AppData\Local\Continuum\Anaconda2) C:\Users\john>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@kalefranz argh!! thanks for answering back. I understand it might not happen tomorrow, but are we talking a couple months or much more?

An error occurred while installing packages.
CondaIOError: IO error: Missing write permissions in: C:\Program Files\Anaconda2 # # You don't appear to have the necessary permissions to install packages # into the install area 'C:\Program Files\Anaconda2'. # However you can clone this environment into your home directory and # then make changes to it. # This may be done using the command: # # $ conda create -n my_root --clone=C:\Program Files\Anaconda2

OK then

C:\Users\ddot>conda create -n my_root --clone="C:\Program Files\Anaconda2"
Source:      C:\Program Files\Anaconda2
Destination: C:\Users\ddot\.conda\envs\my_root
The following packages cannot be cloned out of the root environment:
 - conda-4.2.9-py27_0
 - conda-build-2.0.2-py27_0
Packages: 181
Files: 238
WARNING conda.lock:touch(53): Failed to create lock, do not run conda in parallel processes [errno 13]
Extracting packages ...
WARNING conda.lock:touch(53): Failed to create lock, do not run conda in parallel processes [errno 13]
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:

    https://github.com/conda/conda/issues



Current conda install:

               platform : win-64
          conda version : 4.2.9
       conda is private : False
      conda-env version : 4.2.9
    conda-build version : 2.0.2
         python version : 2.7.12.final.0
       requests version : 2.11.1
       root environment : C:\Program Files\Anaconda2  (read only)
    default environment : C:\Program Files\Anaconda2
       envs directories : C:\Users\ddot\.conda\envs
                          C:\Program Files\Anaconda2\envs
          package cache : C:\Users\ddot\.conda\envs\.pkgs
                          C:\Program Files\Anaconda2\pkgs
           channel URLs : https://repo.continuum.io/pkgs/free/win-64/
                          https://repo.continuum.io/pkgs/free/noarch/
                          https://repo.continuum.io/pkgs/pro/win-64/
                          https://repo.continuum.io/pkgs/pro/noarch/
                          https://repo.continuum.io/pkgs/msys2/win-64/
                          https://repo.continuum.io/pkgs/msys2/noarch/
            config file : None
           offline mode : False



`$ C:\Program Files\Anaconda2\Scripts\conda-script.py create -n my_root --clone=C:\Program Files\Anaconda2`




    Traceback (most recent call last):
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\exceptions.py", line 473, in conda_exception_handler
        return_value = func(*args, **kwargs)
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\cli\main.py", line 144, in _main
        exit_code = args.func(args, p)
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\cli\main_create.py", line 68, in execute
        install(args, parser, 'create')
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\cli\install.py", line 228, in install
        clone(args.clone, prefix, json=context.json, quiet=context.quiet, index_args=index_args)
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\cli\install.py", line 90, in clone
        index_args=index_args)
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\misc.py", line 387, in clone_env
        force_extract=False, index_args=index_args)
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\misc.py", line 187, in explicit
        execute_actions(actions, index=index, verbose=verbose)
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\plan.py", line 643, in execute_actions
        inst.execute_instructions(plan, index, verbose)
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\instructions.py", line 134, in execute_instructions
        cmd(state, arg)
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\instructions.py", line 58, in EXTRACT_CMD
        extract(arg)
      File "C:\Program Files\Anaconda2\lib\site-packages\conda\install.py", line 801, in extract
        t.extractall(path=temp_path)
      File "C:\Program Files\Anaconda2\lib\tarfile.py", line 2079, in extractall
        self.extract(tarinfo, path)
      File "C:\Program Files\Anaconda2\lib\tarfile.py", line 2116, in extract
        self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
      File "C:\Program Files\Anaconda2\lib\tarfile.py", line 2192, in _extract_member
        self.makefile(tarinfo, targetpath)
      File "C:\Program Files\Anaconda2\lib\tarfile.py", line 2232, in makefile
        with bltn_open(targetpath, "wb") as target:
    IOError: [Errno 13] Permission denied: u'C:\\Program Files\\Anaconda2\\pkgs\\mkl-11.3.3-1.tmp\\Library\\bin\\cilkrts20.dll'

hello everyone... I am desperate to get a new version of anaconda that hopefully fixes this horrendous bug! Basically, I cannot use conda install, which makes the whole anaconda install pretty useless.... :( @kalefranz , I know you all are super busy, but do you know when the next release of anaconda will be available? Many thanks!!

hello there! no updates? sorry for insisting but I cannot update my packages right now.... thanks!!!


Current conda install:

               platform : win-64
          conda version : 4.2.13
       conda is private : False
      conda-env version : 4.2.13
    conda-build version : 2.0.2
         python version : 2.7.12.final.0
       requests version : 2.11.1
       root environment : C:\Users\__username__\AppData\Local\Continuum\Anaconda2  (wri
table)
    default environment : C:\Users\__username__\AppData\Local\Continuum\Anaconda2\envs\
p3
       envs directories : C:\Users\__username__\AppData\Local\Continuum\Anaconda2\envs
          package cache : C:\Users\__username__\AppData\Local\Continuum\Anaconda2\pkgs
           channel URLs : https://repo.continuum.io/pkgs/free/win-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/pro/win-64
                          https://repo.continuum.io/pkgs/pro/noarch
                          https://repo.continuum.io/pkgs/msys2/win-64
                          https://repo.continuum.io/pkgs/msys2/noarch
            config file : None
           offline mode : False



`$ C:\Users\__username__\AppData\Local\Continuum\Anaconda2\Scripts\conda-script.py inst
all pandas`




    Traceback (most recent call last):
      File "C:\Users\__username__\AppData\Local\Continuum\Anaconda2\lib\site-packages\c
onda\exceptions.py", line 479, in conda_exception_handler
        return_value = func(*args, **kwargs)
      File "C:\Users\__username__\AppData\Local\Continuum\Anaconda2\lib\site-packages\c
onda\cli\main.py", line 145, in _main
        exit_code = args.func(args, p)
      File "C:\Users\__username__\AppData\Local\Continuum\Anaconda2\lib\site-packages\c
onda\cli\main_install.py", line 80, in execute
        install(args, parser, 'install')
      File "C:\Users\__username__\AppData\Local\Continuum\Anaconda2\lib\site-packages\c
onda\cli\install.py", line 405, in install
        execute_actions(actions, index, verbose=not context.quiet)
      File "C:\Users\__username__\AppData\Local\Continuum\Anaconda2\lib\site-packages\c
onda\plan.py", line 643, in execute_actions
        inst.execute_instructions(plan, index, verbose)
      File "C:\Users\__username__\AppData\Local\Continuum\Anaconda2\lib\site-packages\c
onda\instructions.py", line 135, in execute_instructions
        cmd(state, arg)
      File "C:\Users\__username__\AppData\Local\Continuum\Anaconda2\lib\site-packages\c
onda\instructions.py", line 58, in EXTRACT_CMD
        extract(arg)
      File "C:\Users\__username__\AppData\Local\Continuum\Anaconda2\lib\site-packages\c
onda\install.py", line 812, in extract
        exp_backoff_fn(os.rename, temp_path, path)
      File "C:\Users\__username__\AppData\Local\Continuum\Anaconda2\lib\site-packages\c
onda\common\disk.py", line 165, in exp_backoff_fn
        result = fn(*args, **kwargs)
    WindowsError: [Error 5] Access is denied

i got the error above while installing pandas on a new python 3 environment i just created. similar errors have occurred before with other packages too. previously i had to download the package(s) and install manually via pip install wheel file.

Potentially of note, I am behind a firewall that blocks most conda installs and was using Fiddler to get around it

awww that error drives me crazy. stuck with Pandas 18.1 while 19. is out with plenty of new stuff... I hope we can resolve this soon :(

Same error, Windows 10, avira

Get the same error here, several time when I try to create a python 3 env from python 2.7 in anaconda.
First time the error came up at 2% when extracting packages, second time it broke at 90%.
Have antivirus software installed, but I've got no admin rights to turn it off. :)

I found this thread because I was experiencing a similar issue. Posting my resolution here in case it helps others. I got similar access denied errors when running conda install -c r r-essentials using the latest download of Anaconda with Python 2.7x

I installed anaconda for all users of the PC, which installed into c:\program files\anaconda2.

I determined that the error occurred because of how the installation script checks if I have rights to that directory and its subdirectories. It seems to check if my DOMAIN\USERNAME is explicitly listed as having rights. My rights had been provisioned through a group, so my account was not explicitly named in the access rights list. When I manually added my account with Full Control rights, using my own account name instead of group membership, the install ran fine.

Hope this helps some of the others who posted "me too" here.

waiting for the upcoming new anaconda release, I did zipped the "C:\Users\me\AppData\Local\Continuum\Anaconda2" folder on a computer where the update worked and I replaced it into the one where I have the above issue.

The computers are similar and everything (Python, Pandas) seems to work fine.

I know its not very clean, but what can go wrong with that? Any feedback appreciated!

@SpiritusPrana Thanks! your instructions have helped me. Followed this blog post http://winaero.com/blog/how-to-take-ownership-and-get-full-access-to-files-and-folders-in-windows-10/

While installation you may have selected All Users , now before installing or updating anything you will have to open the Anaconda with Admin privileges - it can be done by right click ---> Run as admin.

Or you can try installing the software and select Just for Me option.

I used @j213j213 solution and finally achieved what I wanted after 3hours. Thanks.

I fixed this issue for myself by changing the file permissions on the folder 'C:\ProgramData\Anaconda3' to allow full control for all users.

There are no known multi-user issues as of conda 4.3.13. If you encounter new problems with conda >= 4.3.13, please file a new issue.

After a few Anaconda updates started to get
CondaIOError: Missing write permissions in: C:\Program Files\Anaconda3
Fixable by running the CMD.exe under admin rights (right click on cmd.exe and choose Run As Administrator).
This does not work using alternative shells or terminals as Cmder or mintty/Babun, etc.

I HAVE AN ISSUE UPGRADING MY PIP 9.0.1 TO 9.0.2 AND I AM GETTING THE BELOW MESSAGE AGAIN AND AGAIN AFTER EVERY COMMAND EXECUTION SO I TRIES UPGRADING IT BUT IT IS ERROR
You are using pip version 9.0.1, however version 9.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

(base) C:\Users\Vikram Kudva>python -m pip install --upgrade pip
Collecting pip
Using cached pip-9.0.2-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Exception:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_uninstall.py", line 115, in remove
renames(path, new_path)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\utils__init__.py", line 267, in renames
shutil.move(old, new)
File "C:\ProgramData\Anaconda2\lib\shutil.py", line 314, in move
rmtree(src)
File "C:\ProgramData\Anaconda2\lib\shutil.py", line 266, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "C:\ProgramData\Anaconda2\lib\shutil.py", line 264, in rmtree
os.remove(fullname)
WindowsError: [Error 5] Access is denied: 'c:\programdata\anaconda2\lib\site-packages\pip\basecommand.py'
You are using pip version 9.0.1, however version 9.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

SO PLEASE HELP ME OUT FOR THIS AS I AM A BEGINNER IN THIS.
THANK YOU.

This is the conda issue tracker, not the pip issue tracker. You’re in the wrong room!

Sent from my iPhone

On Mar 21, 2018, at 1:26 PM, VIKRAMKUDVA notifications@github.com wrote:

I HAVE AN ISSUE UPGRADING MY PIP 9.0.1 TO 9.0.2 AND I AM GETTING THE BELOW MESSAGE AGAIN AND AGAIN AFTER EVERY COMMAND EXECUTION SO I TRIES UPGRADING IT BUT IT IS ERROR
You are using pip version 9.0.1, however version 9.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

(base) C:\Users\Vikram Kudva>python -m pip install --upgrade pip
Collecting pip
Using cached pip-9.0.2-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Exception:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_uninstall.py", line 115, in remove
renames(path, new_path)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\utils_init_.py", line 267, in renames
shutil.move(old, new)
File "C:\ProgramData\Anaconda2\lib\shutil.py", line 314, in move
rmtree(src)
File "C:\ProgramData\Anaconda2\lib\shutil.py", line 266, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "C:\ProgramData\Anaconda2\lib\shutil.py", line 264, in rmtree
os.remove(fullname)
WindowsError: [Error 5] Access is denied: 'c:\programdata\anaconda2\lib\site-packages\pip\basecommand.py'
You are using pip version 9.0.1, however version 9.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

SO PLEASE HELP ME OUT FOR THIS AS I AM A BEGINNER IN THIS.
THANK YOU.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

i tried updating the conda using
conda update -n base conda
but it is showing
WindowsError: [Error 5] Access is denied

can i get some help to rectify thesse error?

Im getting this error whenever i try to upgrade or update any of my library and even pip using:
python -m pip install --upgrade pip

Exception:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_uninstall.py", line 115, in remove
renames(path, new_path)
File "C:\ProgramData\Anaconda2\lib\site-packages\pip\utils_init_.py", line 267, in renames
shutil.move(old, new)
File "C:\ProgramData\Anaconda2\lib\shutil.py", line 314, in move
rmtree(src)
File "C:\ProgramData\Anaconda2\lib\shutil.py", line 266, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "C:\ProgramData\Anaconda2\lib\shutil.py", line 264, in rmtree
os.remove(fullname)
WindowsError: [Error 5] Access is denied: 'c:\programdata\anaconda2\lib\site-packages\pip\basecommand.py

someone please help me rectify this error.
Thankyou.

After many failed attempts, I gave up to install Anaconda. I have installed Python and Jupiter notebook from pip............Such a bad experience! Why can't I install something with just one click?

give edit or full permission to current user to this directory "c:\programdata\anaconda2\lib"

I am having the same issue. I am using Anaconda since 2016 never had this problem on every update, every install access denied. Can anyone sugest the way arround.

`Downloading and Extracting Packages
conda 4.5.11: ########################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(481): An error occurred while uninstalling package 'defaults::conda-4.4.10-py27_0'.
WindowsError(5, 'Access is denied')
Attempting to roll back.

Rolling back transaction: done

WindowsError(5, 'Access is denied')`

@hashamMunir run the command prompt as administrator and then update or install new packages.

Was this page helpful?
0 / 5 - 0 ratings