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

Windows installation - pkg_dirs gets bad path \\server\share\conda\pkgs #347

Open
1 task done
Tracked by #568
ayhteo opened this issue Sep 11, 2022 · 5 comments
Open
1 task done
Tracked by #568
Labels
bug Something isn't working condarc Previous condarc files hindering the installation

Comments

@ayhteo
Copy link

ayhteo commented Sep 11, 2022

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

This concerns a fresh installation on Windows OS 10.0.22000 N/A Build 22000 x64.

When using the Miniforge-pypy3-Windows-x86_64 Miniforge3-Windows-x86_64 installation, for some reason the package cache default path is assigned to \\server\share\conda\pkgs, which then throws the following error whenever I try to do conda update or conda create commands:

NotWritableError: The current user does not have write permissions to a required path. path: \\server\share\conda\pkgs\urls.txt

When I use conda config --show pkgs_dirs, I get the following list:

  • \server\share\conda\pkgs
  • C:\Users\username\miniconda3\pkgs

Hence I ran conda config —add pkgs_dirs C:\Users\username\miniconda3\pkgs which pushed the latter path to the top of the list. From thereon, my conda installation is now working and I can create environments as per normal.

I had the same issue with miniconda. The SHA256 checksum was correct.

Installed packages

# packages in environment at C:\Users\sophi\miniforge3:
#
# Name                    Version                   Build  Channel
brotlipy                  0.7.0           py310he2412df_1004    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2022.6.15            h5b45459_0    conda-forge
certifi                   2022.6.15       py310h5588dad_0    conda-forge
cffi                      1.15.1          py310hcbf9ad4_0    conda-forge
charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
colorama                  0.4.5              pyhd8ed1ab_0    conda-forge
conda                     4.14.0          py310h5588dad_0    conda-forge
conda-package-handling    1.8.1           py310h4f637d6_1    conda-forge
cryptography              37.0.4          py310ha857299_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libsqlite                 3.39.2               h8ffe710_1    conda-forge
libzlib                   1.2.12               h8ffe710_2    conda-forge
menuinst                  1.4.19          py310h5588dad_0    conda-forge
miniforge_console_shortcut 1.0                  h57928b3_0    conda-forge
openssl                   1.1.1q               h8ffe710_0    conda-forge
pip                       22.2.2             pyhd8ed1ab_0    conda-forge
pycosat                   0.6.3           py310he2412df_1010    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1           py310h5588dad_5    conda-forge
python                    3.10.6          h9a09f29_0_cpython    conda-forge
python_abi                3.10                    2_cp310    conda-forge
requests                  2.28.1             pyhd8ed1ab_0    conda-forge
ruamel_yaml               0.15.80         py310he2412df_1007    conda-forge
setuptools                65.2.0          py310h5588dad_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
tk                        8.6.12               h8ffe710_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tqdm                      4.64.0             pyhd8ed1ab_0    conda-forge
tzdata                    2022c                h191b570_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.26.11            pyhd8ed1ab_0    conda-forge
vc                        14.2                 hb210afc_6    conda-forge
vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0           py310h5588dad_4    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge

Environment info

active environment : base
    active env location : C:\Users\sophi\miniforge3
            shell level : 1
       user config file : C:\Users\sophi\.condarc
 populated config files : C:\Users\sophi\miniforge3\.condarc
                          C:\Users\sophi\.condarc
          conda version : 4.14.0
    conda-build version : not installed
         python version : 3.10.6.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\sophi\miniforge3  (writable)
      conda av data dir : C:\Users\sophi\miniforge3\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-canary/win-64
                          https://conda.anaconda.org/conda-canary/noarch
                          https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/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 : \\server\share\conda\pkgs
                          C:\Users\sophi\miniconda3\pkgs
       envs directories : C:\Users\sophi\miniforge3\envs
                          C:\Users\sophi\.conda\envs
                          C:\Users\sophi\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.14.0 requests/2.28.1 CPython/3.10.6 Windows/10 Windows/10.0.22000
          administrator : True
             netrc file : None
           offline mode : False
@ayhteo ayhteo added the bug Something isn't working label Sep 11, 2022
@hmaarrfk
Copy link
Contributor

Thank you for the detailed report and workaround.

Do you know if this happens only for the pypy builds?

@hmaarrfk
Copy link
Contributor

Might you have had an old installation of conda?

Looking at our logs, we "install" mambaforge-pypy3 and we output conda-info. I see:

***** Print conda info *****
+++ conda.exe info

     active environment : base
    active env location : C:\Users\runneradmin\miniforge
            shell level : 3
       user config file : C:\Users\runneradmin\.condarc
 populated config files : C:\Users\runneradmin\miniforge\.condarc
                          C:\Users\runneradmin\.condarc
          conda version : 4.14.0
    conda-build version : not installed
         python version : 3.9.12.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\runneradmin\miniforge  (writable)
      conda av data dir : C:\Users\runneradmin\miniforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Users\runneradmin\conda_pkgs_dir
       envs directories : C:\Users\runneradmin\miniforge\envs
                          C:\Users\runneradmin\.conda\envs
                          C:\Users\runneradmin\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.14.0 requests/2.28.1 PyPy/3.9.12 Windows/10 Windows/10.0.20348
          administrator : True
             netrc file : None
           offline mode : False

+++ conda.exe list
# packages in environment at C:\Users\runneradmin\miniforge:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2022.6.15            h5b45459_0    conda-forge
certifi                   2022.6.15        py39h0d475fb_0    conda-forge
charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
colorama                  0.4.5              pyhd8ed1ab_0    conda-forge
conda                     4.14.0           py39h0d475fb_0    conda-forge
conda-package-handling    1.8.1            py39hf22a004_1    conda-forge
cryptography              37.0.4           py39h2286605_0    conda-forge
expat                     2.4.8                h39d44d4_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libsqlite                 3.39.2               h8ffe710_1    conda-forge
libzlib                   1.2.12               h8ffe710_2    conda-forge
menuinst                  1.4.19           py39h0d475fb_0    conda-forge
miniforge_console_shortcut 1.0                  h57928b3_0    conda-forge
openssl                   1.1.1q               h8ffe710_0    conda-forge
pip                       22.2.2             pyhd8ed1ab_0    conda-forge
pycosat                   0.6.3           py39hdb6a8a0_1010    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pypy3.9                   7.3.9                hc3b0203_4    conda-forge
pysocks                   1.7.1            py39h0d475fb_5    conda-forge
python                    3.9.12                0_73_pypy    conda-forge
python_abi                3.9               2_pypy39_pp73    conda-forge
requests                  2.28.1             pyhd8ed1ab_0    conda-forge
ruamel_yaml               0.15.80         py39hdb6a8a0_1007    conda-forge
setuptools                65.2.0           py39h0d475fb_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.39.2               h8ffe710_1    conda-forge
tk                        8.6.12               h8ffe710_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tqdm                      4.64.0             pyhd8ed1ab_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.24.3                     py_1    conda-forge
vc                        14.2                 hb210afc_6    conda-forge
vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0            py39h0d475fb_4    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
zlib                      1.2.12               h8ffe710_2    conda-forge

https://github.com/conda-forge/miniforge/runs/7985353354?check_suite_focus=true

@ayhteo
Copy link
Author

ayhteo commented Sep 11, 2022

I was helping someone else with their conda installation, and I believe there is a deeper problem to this having spoken to them. They began from a Python 3.9 Miniconda3 Windows 64-bit installation.

During their fresh installation, they encountered a "KeyError('pkgs_dirs')", not dissimilar from this recent post on stack overflow.

I think the reported problem above was introduced when they attempted the following suggestion in the interim, which ended up appending to the .condarc file.
conda config --add pkgs_dirs \\server\share\conda\pkgs

This was the .condarc file:

channels:
  - conda-canary
  - conda-forge
  - defaults
pkgs_dirs:
  - \\server\share\conda\pkgs
  - C:\Users\sophi\miniconda3\pkgs

They than managed to fix the "KeyError('pkgs_dirs')" issue by downgrading to pywin32==228, originally configured to 303, which solved the pkg_dirs issue. This then spawned the NotWritableError which I had reported, without knowing that the earlier attempts.

I switched to the Miniforge3-Windows-x86_64 installation (not the pypy build, apologies, this was me getting the wrong link), to check it was not the installation issue.

@hmaarrfk
Copy link
Contributor

OK yeah..... this is somewhat a hard problem for us to solve.

That .condarc file is a user file, that is meant to be "shared" between all installations. Maybe there is some better interaction we can have.

But for now, I think we should add instructions to remove it. I don't think we will have a programatic solution fast enough.

@hmaarrfk hmaarrfk added the condarc Previous condarc files hindering the installation label Sep 11, 2022
@ayhteo
Copy link
Author

ayhteo commented Sep 11, 2022

Thanks - I understand it better now, and appreciate that you have compiled this into an issue detailing similar problems others have faced. Certainly for me the .condarc file was a spanner in the works without prior knowledge of what was previously done on the machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working condarc Previous condarc files hindering the installation
Development

No branches or pull requests

2 participants