Skip to content
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

conda permission errors #8155

Open
jsignell opened this issue Jan 28, 2019 · 16 comments

Comments

@jsignell
Copy link

commented Jan 28, 2019

Originally posted as appveyor/ci#2822

Current Behavior

In Appveyor, using conda 4.6.1 to install any libraries which attempt to write an entrypoint script into the miniconda env directory raises Permission Denied errors and causes the build to fail. An example is this build on the public hvPlot repo:

ERROR conda.core.link:_execute(543): An error occurred while installing package 'conda-forge::ipykernel-5.1.0-py36h39e3cac_1001'.
PermissionError(13, 'Permission denied')
Attempting to roll back.
Rolling back transaction: ...working... done
[Errno 13] Permission denied: 'C:\\Miniconda36-x64\\envs\\earthml\\Scripts\\jupyter-kernel.exe'

Steps to Reproduce

conda install jupyter

Expected Behavior

On conda 4.5.4 the install works as expected

Environment Information

`conda info`

     active environment : None
       user config file : C:\Users\appveyor\.condarc
 populated config files : C:\Users\appveyor\.condarc
          conda version : 4.6.1
    conda-build version : not installed
         python version : 3.6.5.final.0
       base environment : C:\Miniconda36-x64  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Miniconda36-x64\pkgs
                          C:\Users\appveyor\.conda\pkgs
                          C:\Users\appveyor\AppData\Local\conda\conda\pkgs
       envs directories : C:\Miniconda36-x64\envs
                          C:\Users\appveyor\.conda\envs
                          C:\Users\appveyor\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.6.1 requests/2.18.4 CPython/3.6.5 Windows/2012ServerR2 Windows/6.3.9600
          administrator : True
             netrc file : None
           offline mode : False

`conda config --show-sources`


`conda list --show-channel-urls`


@msarahan

This comment has been minimized.

Copy link
Contributor

commented Jan 28, 2019

Of course, I can't reproduce this locally. I think it might come down to an "all-users" vs "just-me" install. As a hack you could try adding an empty .nonadmin file to the C:\Miniconda36-x64 folder.

Sorry, but it might be a while before we can get around to debugging this. If you're stuck, I recommend just pinning to the older conda version for now.

@philippjfr

This comment has been minimized.

Copy link

commented Jan 28, 2019

As far as I can tell this is affecting all appveyor miniconda builds which install packages with entrypoint scripts, and presumably also a sizable portion of regular Windows users. Would be great to get a fix for this soon so we can start enjoying the speed improvements in latest conda 😄

I'll try reproducing it locally on my windows machine and dig a bit.

@msarahan msarahan added the type-bug label Jan 28, 2019

@kalefranz

This comment has been minimized.

Copy link
Member

commented Jan 28, 2019

There's something that doesn't quite line up here. How is it that the package is conda-forge::ipykernel-5.1.0-py36h39e3cac_1001, but there's no mention of the conda-forge channel anywhere else in the report?

@kalefranz

This comment has been minimized.

Copy link
Member

commented Jan 28, 2019

I see. That actual command according to https://ci.appveyor.com/project/pyviz/hvplot/builds/21921315/job/yr6fahphkmxw1cim#L720 was

conda install -y  -c pyviz/label/dev -c conda-forge "bokeh >=1.0.0" "holoviews >=1.11.0" "pandas<0.24.0" "coveralls" "nose" "flake8" "parameterized" "pytest" "nbsmoke >=0.2.0"
@jsignell

This comment has been minimized.

Copy link
Author

commented Jan 28, 2019

Ah right - forgot to mention the channel info - like I said this was on appveyor so hard to debug.

@kalefranz

This comment has been minimized.

Copy link
Member

commented Jan 28, 2019

My guess is the environment creation command was

conda create -y -n test -c pyviz/label/dev -c conda-forge "param>=1.7.0" "pyct>=0.4.4" "setuptools>=30.3.0"

So the two-step recreation process would be

conda create -y -n test -c pyviz/label/dev -c conda-forge "param>=1.7.0" "pyct>=0.4.4" "setuptools>=30.3.0"
conda install -y -n test -c pyviz/label/dev -c conda-forge "bokeh >=1.0.0" "holoviews >=1.11.0" "pandas<0.24.0" "coveralls" "nose" "flake8" "parameterized" "pytest" "nbsmoke >=0.2.0"

but it would be helpful to have that confirmed.

@msarahan

This comment has been minimized.

Copy link
Contributor

commented Jan 28, 2019

There is a really neat trick to debug things on appveyor: https://www.appveyor.com/docs/how-to/rdp-to-build-worker/

@soapy1

This comment has been minimized.

Copy link
Contributor

commented Jan 28, 2019

I was able to reproduce this on a windows machine running a non-admin console with the command

$conda install -y  -c pyviz/label/dev -c conda-forge bokeh holoviews pandas coveralls nose 
flake8 parameterized pytest nbsmoke
@msarahan

This comment has been minimized.

Copy link
Contributor

commented Jan 28, 2019

I suspect that this has something to do with the entry point exe already being present in the package, then conda barfing when trying to overwrite it with a generated entry point exe. If that's accurate, the fix should be reasonable.

@kalefranz

This comment has been minimized.

Copy link
Member

commented Jan 29, 2019

@kalefranz

This comment has been minimized.

Copy link
Member

commented Jan 29, 2019

jsignell added a commit to intake/intake that referenced this issue Jan 29, 2019

@soapy1

This comment has been minimized.

Copy link
Contributor

commented Jan 29, 2019

Looks like this is fixed on master, it should be resolved in the next release of conda

@ocefpaf

This comment has been minimized.

Copy link

commented Jan 30, 2019

I just tested conda 4.6.2 from the canary channel and it seems that the problem persists:

https://ci.appveyor.com/project/ocefpaf/notebooks-demos/builds/21998415

It may be specific to my config there. I'll try to isolate the problem and create some steps to reproduce it.

@msarahan

This comment has been minimized.

Copy link
Contributor

commented Jan 30, 2019

This is so dumb, I had to laugh:

C:\Miniconda36-x64\envs\IOOS\Scripts\pygmentize.exe.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash - Access is denied.
C:\Miniconda36-x64\envs\IOOS\Scripts\tabulate.exe.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash.trash - Access is denied.

Clearly, needs improvement. I think we need to look at exactly what that post-link is failing on:

LinkError: post-link script failed for package conda-forge::nb_conda_kernels-2.2.0-py37_1000

The traceback indicates that it is related to AnacondaRecipes/nb_conda_kernels-feedstock#1

@msarahan msarahan reopened this Jan 30, 2019

@dhirschfeld

This comment has been minimized.

Copy link
Contributor

commented Jan 30, 2019

ping @SylvainCorlay - this might be of interest.

jonmmease added a commit to pyviz/datashader that referenced this issue Jan 31, 2019

@SylvainCorlay

This comment has been minimized.

Copy link

commented Jan 31, 2019

Thanks @dhirschfeld. This appears to be it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.