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

Closed
jsignell opened this issue Jan 28, 2019 · 17 comments
Closed

conda permission errors #8155

jsignell opened this issue Jan 28, 2019 · 17 comments
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@jsignell
Copy link

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
Copy link
Contributor

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
Copy link

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 describes erroneous operation, use severity::* to classify the type label Jan 28, 2019
@kalefranz
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Author

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

@kalefranz
Copy link
Contributor

kalefranz 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
Copy link
Contributor

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

@soapy1
Copy link
Contributor

soapy1 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
Copy link
Contributor

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
Copy link
Contributor

kalefranz commented Jan 29, 2019 via email

@kalefranz
Copy link
Contributor

kalefranz commented Jan 29, 2019 via email

jsignell added a commit to intake/intake that referenced this issue Jan 29, 2019
@soapy1
Copy link
Contributor

soapy1 commented Jan 29, 2019

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

@ocefpaf
Copy link

ocefpaf 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
Copy link
Contributor

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
Copy link
Contributor

ping @SylvainCorlay - this might be of interest.

jonmmease added a commit to holoviz/datashader that referenced this issue Jan 31, 2019
@SylvainCorlay
Copy link

Thanks @dhirschfeld. This appears to be it!

@github-actions
Copy link

Hi there, thank you for your contribution to Conda!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue in the latest version of Conda

  2. Comment that the issue is still reproducible and include:

  • What version of Conda you reproduced the issue on
  • What OS and version you reproduced the issue on
  • What steps you followed to reproduce the issue
  1. It would also be helpful to have the output of the following commands available:
  • conda info
  • conda config --show-sources
  • conda list --show-channel-urls

NOTE: If this issue was closed prematurely, please leave a comment and we will gladly reopen the issue.

In case this issue was originally about a project that is covered by the Anaconda issue tracker (e.g. Anaconda, Miniconda, packages built by Anaconda, Inc. like Anaconda Navigator etc), please reopen the issue there again.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Feb 26, 2022
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label May 15, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label May 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
None yet
Development

No branches or pull requests

8 participants