Conda and permissions on windows

Dear community

I am using a dedicated virtual machine and windows 10.
The script worked fine, until
conda install -c conda-forge git gdal “numpy<2” abseil-cpp

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(950): An error occurred while installing package ‘conda-forge::vc14_runtime-14.40.33810-ha82c5b3_21’.
Rolling back transaction: done
[Errno 13] Permission denied: ‘C:\Users\f80809100\AppData\Local\miniconda3\envs\env-invest\msvcp140.dll’
()

I am unsure, as I do not understand, why permission is know denied, do I need to change now the sslbackend schannel? The error occurred since I introduced this line (necessery because of my virtual machine and institutional firewalls).

The planned script

  1. Clone NCCS InVEST respository
    mkdir NCCS
    cd NCCS
    git config --global http.sslbackend schannel
    git clone https://github.com/mlacayoemery/NCCS-InVEST.git
    cd NCCS-InVEST

  2. Setup development environment

conda config --set ssl_verify false
conda create -n env-invest -c conda-forge “python=3.11”
conda activate env-invest
python --version
python -m pip --version
conda install -c conda-forge git gdal “numpy<2” abseil-cpp
gdalinfo --version
python -m pip install --upgrade pip setuptools wheel
cd NCCS-InVEST_main
pip install -r requirements-dev.txt
pip install .

Kind regards
Sibylle

Dear community

In the meantime I skipped
git config --global http.sslbackend schannel
…and started with step 2, as the script is now installed.

However I got a new error at, even I have installed Visual basic.
pip install .
uilding wheels for collected packages: natcap.invest
Building wheel for natcap.invest (pyproject.toml) … error
error: subprocess-exited-with-error

× Building wheel for natcap.invest (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [102 lines of output]

building ‘natcap.invest.delineateit.delineateit_core’ extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools”: Microsoft C++ Build Tools - Visual Studio
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for natcap.invest
Failed to build natcap.invest
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (natcap.invest)

Kind regards
Sibylle

First error is permission denied while linking to the target environment. The SSL config shouldn’t affect, since the downloads have happened already.

Are you running any program from that environment already? Windows will block writes to opened files, so that might be the explanation. Try again with the first attempt after restarting your machine to make sure.

As an alternative, try creating a new environment if for some reason that file is blocked by a process you can’t close.

As for the second, pip is trying to compile the project on the spot for you, so it’s suggesting you to get the Windows compilers to do so. But before going down that line, try to get conda working, it’ll save a lot of pain.

1 Like

Dear @jaimergp

Many thanks.

  1. Yes I asked now IT service to provide me admin permission then I was planning to install VC++ 14.
  2. I am new to conday, python etc. so I am unsure about the second answer. But I just started an empty anaconda prompt and typed in the planned script above. I suppose no, I am not running another program from that environment.

I do not understand exactly what you mean by “get conda working”? I was able to run the script until “pip install .”, so I assume that conda is working. specifically no error for the script: conda install -c conda-forge git gdal “numpy<2” abseil-cpp.

Kind regards
Sibylle