mariusvniekerk / condax

Install and run applications packaged with conda in isolated environments

Home Page:https://mariusvniekerk.github.io/condax/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

condax attempts to create symlink under Windows and fails

ArneBachmannDLR opened this issue · comments

(myenv) D:\forks\...>condax install httpie
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: C:\Users\bach_ar\.condax\httpie

  added / updated specs:
    - httpie


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    charset-normalizer-2.1.1   |     pyhd8ed1ab_0          36 KB  conda-forge
    httpie-3.2.1               |  py310h5588dad_0         194 KB  conda-forge
    libsqlite-3.39.3           |       hcfcfb64_0         642 KB  conda-forge
    multidict-6.0.2            |  py310he2412df_1          47 KB  conda-forge
    pysocks-1.7.1              |     pyh0701188_6          19 KB  conda-forge
    python-3.10.6              |h9a09f29_0_cpython        16.5 MB  conda-forge
    requests-2.28.1            |     pyhd8ed1ab_1          53 KB  conda-forge
    setuptools-65.3.0          |     pyhd8ed1ab_1         782 KB  conda-forge
    vc-14.2                    |       hb210afc_7          14 KB  conda-forge
    vs2015_runtime-14.29.30139 |       h890b9b1_7         1.3 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        19.6 MB

The following NEW packages will be INSTALLED:

  brotlipy           conda-forge/win-64::brotlipy-0.7.0-py310he2412df_1004
  bzip2              conda-forge/win-64::bzip2-1.0.8-h8ffe710_4
  ca-certificates    conda-forge/win-64::ca-certificates-2022.6.15-h5b45459_0
  certifi            conda-forge/noarch::certifi-2022.6.15-pyhd8ed1ab_1
  cffi               conda-forge/win-64::cffi-1.15.1-py310hcbf9ad4_0
  charset-normalizer conda-forge/noarch::charset-normalizer-2.1.1-pyhd8ed1ab_0
  colorama           conda-forge/noarch::colorama-0.4.5-pyhd8ed1ab_0
  commonmark         conda-forge/noarch::commonmark-0.9.1-py_0
  cryptography       conda-forge/win-64::cryptography-37.0.4-py310ha857299_0
  dataclasses        conda-forge/noarch::dataclasses-0.8-pyhc8e2a94_3
  defusedxml         conda-forge/noarch::defusedxml-0.7.1-pyhd8ed1ab_0
  future             conda-forge/win-64::future-0.18.2-py310h5588dad_5
  httpie             conda-forge/win-64::httpie-3.2.1-py310h5588dad_0
  idna               conda-forge/noarch::idna-3.3-pyhd8ed1ab_0
  libffi             conda-forge/win-64::libffi-3.4.2-h8ffe710_5
  libsqlite          conda-forge/win-64::libsqlite-3.39.3-hcfcfb64_0
  libzlib            conda-forge/win-64::libzlib-1.2.12-h8ffe710_2
  multidict          conda-forge/win-64::multidict-6.0.2-py310he2412df_1
  openssl            conda-forge/win-64::openssl-1.1.1q-h8ffe710_0
  pip                conda-forge/noarch::pip-22.2.2-pyhd8ed1ab_0
  pycparser          conda-forge/noarch::pycparser-2.21-pyhd8ed1ab_0
  pygments           conda-forge/noarch::pygments-2.13.0-pyhd8ed1ab_0
  pyopenssl          conda-forge/noarch::pyopenssl-22.0.0-pyhd8ed1ab_0
  pysocks            conda-forge/noarch::pysocks-1.7.1-pyh0701188_6
  python             conda-forge/win-64::python-3.10.6-h9a09f29_0_cpython
  python_abi         conda-forge/win-64::python_abi-3.10-2_cp310
  requests           conda-forge/noarch::requests-2.28.1-pyhd8ed1ab_1
  requests-toolbelt  conda-forge/noarch::requests-toolbelt-0.9.1-py_0
  rich               conda-forge/noarch::rich-12.5.1-pyhd8ed1ab_0
  setuptools         conda-forge/noarch::setuptools-65.3.0-pyhd8ed1ab_1
  tk                 conda-forge/win-64::tk-8.6.12-h8ffe710_0
  typing_extensions  conda-forge/noarch::typing_extensions-4.3.0-pyha770c72_0
  tzdata             conda-forge/noarch::tzdata-2022c-h191b570_0
  ucrt               conda-forge/win-64::ucrt-10.0.20348.0-h57928b3_0
  urllib3            conda-forge/noarch::urllib3-1.26.11-pyhd8ed1ab_0
  vc                 conda-forge/win-64::vc-14.2-hb210afc_7
  vs2015_runtime     conda-forge/win-64::vs2015_runtime-14.29.30139-h890b9b1_7
  wheel              conda-forge/noarch::wheel-0.37.1-pyhd8ed1ab_0
  win_inet_pton      conda-forge/win-64::win_inet_pton-1.1.0-py310h5588dad_4
  xz                 conda-forge/win-64::xz-5.2.6-h8d14728_0


Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
{'C:\\Users\\bach_ar\\.condax\\httpie/Scripts/httpie-script.py', 'C:\\Users\\bach_ar\\.condax\\httpie/Scripts/httpie.exe', 'C:\\Users\\bach_ar\\.condax\\httpie/Scripts/https-script.py', 'C:\\Users\\bach_ar\\.condax\\httpie/Scripts/https.exe', 'C:\\Users\\bach_ar\\.condax\\httpie/Scripts/http.exe', 'C:\\Users\\bach_ar\\.condax\\httpie/Scripts/http-script.py'}
['auto-py-to-exe.exe', 'autopytoexe.exe', 'glances.exe', 'hatch.exe', 'pdm.exe', 'pls-dev.exe', 'pls.exe']
Traceback (most recent call last):
  File "C:\ProgramData\mambaforge\envs\hace\Scripts\condax-script.py", line 9, in <module>
    sys.exit(cli())
  File "C:\Users\bach_ar\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\bach_ar\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\bach_ar\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\bach_ar\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\bach_ar\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\ProgramData\mambaforge\envs\hace\lib\site-packages\condax\cli.py", line 43, in install
    core.install_package(
  File "C:\ProgramData\mambaforge\envs\hace\lib\site-packages\condax\core.py", line 112, in install_package
    create_links(executables_to_link, link_conflict_action)
  File "C:\ProgramData\mambaforge\envs\hace\lib\site-packages\condax\core.py", line 84, in create_links
    link_succeeded[exe] = create_link(exe, link_conflict_action)
  File "C:\ProgramData\mambaforge\envs\hace\lib\site-packages\condax\core.py", line 77, in create_link
    return create_link_func(exe, link_conflict_action)
  File "C:\ProgramData\mambaforge\envs\hace\lib\site-packages\condax\core.py", line 58, in create_link_unix
    os.symlink(exe, f"{CONDAX_LINK_DESTINATION}/{executable_name}")
OSError: [WinError 1314] Dem Client fehlt ein erforderliches Recht: 'C:\\Users\\bach_ar\\.condax\\httpie/Scripts/httpie-script.py' -> 'C:\\Users\\bach_ar\\.local\\bin/httpie-script.py'

I think the link to C:\Users\bach_ar\.local\bin/ is just wrong on Windows, and definitely not on my PATH.

BTW I have no write rights when in the base environment of my mambaforge installation, only inside environments.
I'm unsure in what environment condax is installed (the current one, likely) and how that affects the condax repository and binary paths.