Giter Club home page Giter Club logo

condax's Introduction

condax

Docs GitHub Workflow Status Licence: MIT PyPI code-style Black

Condax is inpired by the excellent pipx, and attempts to do something similar, just using conda thus lifting the constraints of only packaging python things.

Installation

condax is distributed on PyPI as a universal wheel and is available on Linux and macOS and supports Python 3.5+ and PyPy.

$ pip install condax

License

condax is distributed under the terms of the MIT License.

condax's People

Contributors

abrahammurciano avatar cswartzvi avatar jtilly avatar maresb avatar mariusvniekerk avatar renovate[bot] avatar xhochy avatar yamaton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

condax's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/docs.yml
  • actions/checkout v3
  • actions/setup-python v4
.github/workflows/pre-commit.yml
  • actions/checkout v3
  • actions/setup-python v4
  • pre-commit/action v3.0.0
.github/workflows/pythonpackage.yml
  • actions/checkout v3
  • actions/setup-python v4
.github/workflows/release.yml
  • actions/checkout v3
  • actions/setup-python v4
pep621
pyproject.toml
  • pydantic >=2
  • hatchling >=0.21.1
pip_requirements
.github/workflows/requirements-docs.txt
ci/requirements.txt

  • Check this box to trigger a request for Renovate to run again on this repository

Executable not found after condax install

$ pip install condax
Successfully installed condax-0.0.4

(conda install condax gives a package not found error)

$ condax install poetry
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: C:\Users\REDACTED\.condax\poetry

  added / updated specs:
    - poetry


The following NEW packages will be INSTALLED:

  attrs              conda-forge/noarch::attrs-19.3.0-py_0
  ca-certificates    conda-forge/win-64::ca-certificates-2019.11.28-hecc5488_0
  cachecontrol       conda-forge/noarch::cachecontrol-0.12.5-py_0
  cachy              conda-forge/noarch::cachy-0.3.0-py_0
  certifi            conda-forge/win-64::certifi-2019.11.28-py38_0
  cffi               conda-forge/win-64::cffi-1.13.2-py38hb32ad35_0
  chardet            conda-forge/win-64::chardet-3.0.4-py38_1003
  cleo               conda-forge/noarch::cleo-0.7.6-py_0
  clikit             conda-forge/noarch::clikit-0.4.1-py_1
  cryptography       conda-forge/win-64::cryptography-2.8-py38hb32ad35_1
  entrypoints        conda-forge/win-64::entrypoints-0.3-py38_1000
  html5lib           conda-forge/noarch::html5lib-1.0.1-py_0
  idna               conda-forge/win-64::idna-2.8-py38_1000
  importlib_metadata conda-forge/win-64::importlib_metadata-0.23-py38_0
  jsonschema         conda-forge/win-64::jsonschema-3.2.0-py38_0
  keyring            conda-forge/win-64::keyring-19.2.0-py38_0
  lockfile           conda-forge/noarch::lockfile-0.12.2-py_1
  more-itertools     conda-forge/noarch::more-itertools-8.0.2-py_0
  msgpack-python     conda-forge/win-64::msgpack-python-0.6.2-py38he980bc4_0
  openssl            conda-forge/win-64::openssl-1.1.1d-hfa6e2cd_0
  pastel             conda-forge/noarch::pastel-0.1.0-py_1
  pexpect            conda-forge/win-64::pexpect-4.7.0-py38_0
  pip                conda-forge/win-64::pip-19.3.1-py38_0
  pkginfo            conda-forge/noarch::pkginfo-1.5.0.1-py_0
  poetry             conda-forge/win-64::poetry-1.0.0-py38_0
  pycparser          conda-forge/win-64::pycparser-2.19-py38_1
  pylev              conda-forge/noarch::pylev-1.3.0-py_0
  pyopenssl          conda-forge/win-64::pyopenssl-19.1.0-py38_0
  pyparsing          conda-forge/noarch::pyparsing-2.4.6-py_0
  pyrsistent         conda-forge/win-64::pyrsistent-0.14.11-py38hfa6e2cd_1
  pysocks            conda-forge/win-64::pysocks-1.7.1-py38_0
  python             conda-forge/win-64::python-3.8.0-hc9e8b01_5
  pywin32-ctypes     conda-forge/win-64::pywin32-ctypes-0.2.0-py38_1000
  requests           conda-forge/win-64::requests-2.22.0-py38_1
  requests-toolbelt  conda-forge/noarch::requests-toolbelt-0.8.0-py_1
  setuptools         conda-forge/win-64::setuptools-44.0.0-py38_0
  shellingham        conda-forge/noarch::shellingham-1.3.1-py_0
  six                conda-forge/win-64::six-1.13.0-py38_0
  sqlite             conda-forge/win-64::sqlite-3.30.1-hfa6e2cd_0
  tomlkit            conda-forge/win-64::tomlkit-0.5.8-py38_0
  urllib3            conda-forge/win-64::urllib3-1.25.7-py38_0
  vc                 pkgs/main/win-64::vc-14.1-h0510ff6_4
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.16.27012-hf0eaf9b_1
  webencodings       conda-forge/noarch::webencodings-0.5.1-py_1
  wheel              conda-forge/win-64::wheel-0.33.6-py38_0
  win_inet_pton      conda-forge/win-64::win_inet_pton-1.1.0-py38_0
  wincertstore       conda-forge/win-64::wincertstore-0.2-py38_1003
  zipp               conda-forge/noarch::zipp-0.6.0-py_0


Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
`poetry` has been installed by condax
$ type poetry
bash: type: poetry: not found
$ condax ensure-path
$ type poetry
bash: type: poetry: not found
$ ls ~/.local/bin
total 0

Of course I can run ~/.condax/poetry/Scripts/poetry and it works.

Am I missing something?

Make condax install idempotent

Right now condax install fails if a package is already installed, but it would be much more useful if it just did nothing similar to conda.

Scriptable (commandline) customization of CONDAX_LINK_DESTINATION (link_destination)

The link_destination can be customized in the .condarc, but this is inconvenient for scripts.

It would be helpful if this could be set on the command line, either with a specific flag, or through an environmental variable.

For reference, pipx uses PIPX_BIN_DIR.

My use-case is to use condax to provision my system, so need to link the executables to /usr/local/bin/ rather than a home directory.

A quick hack would be something like this in config.py:

CONDAX_LINK_DESTINATION = path.expanduser(
    os.environ.get(
        'CONDAX_LINK_DESTINATION',
        _config["link_destination"]))

Add link subcommand

Allow to symlink entrypoints with a standalone command:

condax link [-n name] [-p prefix] packagename

This way we can also use condax functionality with user-managed (rather than just condax-managed) environments.

Does not work with some non-Python packages

Problem

Some non-Python packages fail to resolve dependencies. It seems a conda environment is not activated properly.

Example

Following command raises a perl dependency error.

condax install -c conda-forge -c bioconda agat
agat_convert_sp_gxf2gxf.pl --help

But running the executable within the conda environment works.

conda create -y -n agat -c conda-forge -c bioconda agat
conda run -n agat agat_convert_sp_gxf2gxf.pl --help

Proposal

Wrapping an executable with conda run would work better than a symlink.

condax update --all tries to update ALL dependencies, including python

I tried running condax update --all after condax install poetry, and it tried to update every package in the poetry environment. I'm not sure this is what the command is supposed to do. It should update poetry to the latest version, not each one of poetry's dependencies separately?

Also it started updating python (???), and doing this broke my conda installation previously, so I Ctrl-C'd the operation.

Errh... everything is so broken on Windows.

$ condax update --all
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: ...working... done
Solving environment: ...working... done


==> WARNING: A newer version of conda exists. <==
  current version: 4.6.11
  latest version: 4.8.0

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: C:\Users\REDACTED\.condax\poetry


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    asn1crypto-1.2.0           |           py38_0         159 KB  defaults
    attrs-19.3.0               |             py_0          39 KB  defaults
    ca-certificates-2019.11.27 |                0         163 KB  defaults
    certifi-2019.11.28         |           py38_0         157 KB  defaults
    cffi-1.13.2                |   py38h7a1dbc1_0         228 KB  defaults
    chardet-3.0.4              |        py38_1003         190 KB  defaults
    cryptography-2.8           |   py38h7a1dbc1_0         571 KB  defaults
    entrypoints-0.3            |           py38_0          10 KB  defaults
    html5lib-1.0.1             |             py_0          89 KB  defaults
    idna-2.8                   |        py38_1000         103 KB  defaults
    importlib_metadata-1.3.0   |           py38_0          46 KB  defaults
    jsonschema-3.2.0           |           py38_0         112 KB  defaults
    lockfile-0.12.2            |           py38_0          20 KB  defaults
    more-itertools-8.0.2       |             py_0          37 KB  defaults
    msgpack-python-0.6.1       |   py38h74a9793_1          84 KB  defaults
    pexpect-4.7.0              |           py38_0          80 KB  defaults
    pip-19.3.1                 |           py38_0         1.9 MB  defaults
    pkginfo-1.5.0.1            |           py38_0          59 KB  defaults
    pycparser-2.19             |             py_0          89 KB  defaults
    pyopenssl-19.1.0           |           py38_0          88 KB  defaults
    pyparsing-2.4.5            |             py_0          62 KB  defaults
    pysocks-1.7.1              |           py38_0          28 KB  defaults
    python-3.8.0               |       hff0d562_2        19.6 MB  defaults
    requests-2.22.0            |           py38_1          90 KB  defaults
    setuptools-42.0.2          |           py38_0         675 KB  defaults
    six-1.13.0                 |           py38_0          27 KB  defaults
    urllib3-1.25.7             |           py38_0         162 KB  defaults
    webencodings-0.5.1         |           py38_1          20 KB  defaults
    wheel-0.33.6               |           py38_0          53 KB  defaults
    win_inet_pton-1.1.0        |           py38_0           8 KB  defaults
    wincertstore-0.2           |           py38_0          15 KB  defaults
    zipp-0.6.0                 |             py_0           9 KB  defaults
    ------------------------------------------------------------
                                           Total:        24.9 MB

The following NEW packages will be INSTALLED:

  asn1crypto         pkgs/main/win-64::asn1crypto-1.2.0-py38_0

The following packages will be UPDATED:

  importlib_metadata conda-forge::importlib_metadata-0.23-~ --> pkgs/main::importlib_metadata-1.3.0-py38_0
  openssl            conda-forge::openssl-1.1.1d-hfa6e2cd_0 --> pkgs/main::openssl-1.1.1d-he774522_3

The following packages will be SUPERSEDED by a higher-priority channel:

  attrs                                         conda-forge --> pkgs/main
  ca-certificates    conda-forge::ca-certificates-2019.11.~ --> pkgs/main::ca-certificates-2019.11.27-0
  certifi                                       conda-forge --> pkgs/main
  cffi               conda-forge::cffi-1.13.2-py38hb32ad35~ --> pkgs/main::cffi-1.13.2-py38h7a1dbc1_0
  chardet                                       conda-forge --> pkgs/main
  cryptography       conda-forge::cryptography-2.8-py38hb3~ --> pkgs/main::cryptography-2.8-py38h7a1dbc1_0
  entrypoints        conda-forge::entrypoints-0.3-py38_1000 --> pkgs/main::entrypoints-0.3-py38_0
  html5lib                                      conda-forge --> pkgs/main
  idna                                          conda-forge --> pkgs/main
  jsonschema                                    conda-forge --> pkgs/main
  lockfile           conda-forge/noarch::lockfile-0.12.2-p~ --> pkgs/main/win-64::lockfile-0.12.2-py38_0
  more-itertools                                conda-forge --> pkgs/main
  msgpack-python     conda-forge::msgpack-python-0.6.2-py3~ --> pkgs/main::msgpack-python-0.6.1-py38h74a9793_1
  pexpect                                       conda-forge --> pkgs/main
  pip                                           conda-forge --> pkgs/main
  pkginfo            conda-forge/noarch::pkginfo-1.5.0.1-p~ --> pkgs/main/win-64::pkginfo-1.5.0.1-py38_0
  pycparser          conda-forge/win-64::pycparser-2.19-py~ --> pkgs/main/noarch::pycparser-2.19-py_0
  pyopenssl                                     conda-forge --> pkgs/main
  pyparsing               conda-forge::pyparsing-2.4.6-py_0 --> pkgs/main::pyparsing-2.4.5-py_0
  pysocks                                       conda-forge --> pkgs/main
  python               conda-forge::python-3.8.0-hc9e8b01_5 --> pkgs/main::python-3.8.0-hff0d562_2
  requests                                      conda-forge --> pkgs/main
  setuptools          conda-forge::setuptools-44.0.0-py38_0 --> pkgs/main::setuptools-42.0.2-py38_0
  six                                           conda-forge --> pkgs/main
  sqlite              conda-forge::sqlite-3.30.1-hfa6e2cd_0 --> pkgs/main::sqlite-3.30.1-he774522_0
  urllib3                                       conda-forge --> pkgs/main
  webencodings       conda-forge/noarch::webencodings-0.5.~ --> pkgs/main/win-64::webencodings-0.5.1-py38_1
  wheel                                         conda-forge --> pkgs/main
  win_inet_pton                                 conda-forge --> pkgs/main
  wincertstore       conda-forge::wincertstore-0.2-py38_10~ --> pkgs/main::wincertstore-0.2-py38_0
  zipp                                          conda-forge --> pkgs/main



Downloading and Extracting Packages
wincertstore-0.2     | 15 KB     | ########## | 100%
importlib_metadata-1 | 46 KB     | ########## | 100%
pexpect-4.7.0        | 80 KB     | ########## | 100%
more-itertools-8.0.2 | 37 KB     | ########## | 100%
pyparsing-2.4.5      | 62 KB     | ########## | 100%
lockfile-0.12.2      | 20 KB     | ########## | 100%
chardet-3.0.4        | 190 KB    | ########## | 100%
six-1.13.0           | 27 KB     | ########## | 100%
wheel-0.33.6         | 53 KB     | ########## | 100%
pycparser-2.19       | 89 KB     | ########## | 100%
html5lib-1.0.1       | 89 KB     | ########## | 100%
jsonschema-3.2.0     | 112 KB    | ########## | 100%
idna-2.8             | 103 KB    | ########## | 100%
pyopenssl-19.1.0     | 88 KB     | ########## | 100%
certifi-2019.11.28   | 157 KB    | ########## | 100%
requests-2.22.0      | 90 KB     | ########## | 100%
pysocks-1.7.1        | 28 KB     | ########## | 100%
ca-certificates-2019 | 163 KB    | ########## | 100%
zipp-0.6.0           | 9 KB      | ########## | 100%
cryptography-2.8     | 571 KB    | ########## | 100%
cffi-1.13.2          | 228 KB    | ########## | 100%
entrypoints-0.3      | 10 KB     | ########## | 100%
setuptools-42.0.2    | 675 KB    | ########## | 100%
attrs-19.3.0         | 39 KB     | ########## | 100%
pip-19.3.1           | 1.9 MB    | ########## | 100%
msgpack-python-0.6.1 | 84 KB     | ########## | 100%
asn1crypto-1.2.0     | 159 KB    | ########## | 100%
webencodings-0.5.1   | 20 KB     | ########## | 100%
python-3.8.0         | 19.6 MB   | ##8        |  28%
urllib3-1.25.7       | 162 KB    | ########## | 100%
pkginfo-1.5.0.1      | 59 KB     | ########## | 100%
win_inet_pton-1.1.0  | 8 KB      | ########## | 100%

CondaSignalInterrupt: Signal interrupt SIGINT

Terminer le programme de commandes (O/N)▒? o
o

Aborted!

Set minimum required version for click

condax is not compatible with some old versions of click.

For example, I have click 7.0 installed with condax 0.1.1, and condax gives this output for any command:

❯ condax --version
Traceback (most recent call last):

  File "/homes/abrahamm/.local/bin/condax", line 10, in <module>
    sys.exit(cli())

TypeError: __init__() got an unexpected keyword argument 'no_args_is_help'

support for injecting packages

Thanks for this package, it solves exactly my use-case.

However, to be complete, I would need to be able to inject some packages into some environment. This is needed for developing own packages that depend on conda packages.

Do you have any idea if this is supported, and if not how hard it would be to support it?

Allow specifying Python version when installing a package (i.e. --python flag)

Reopening issue #3 (since there appears to be no way to change the owner).

Please provide a way of pinning the version of python used analogous to the pipx --python flag:

condax install --python=3.9 anaconda-project

(I recently ran into this on an M1 running Mac OS X where condax install anaconda-project pulled in python 3.11, breaking anaconda-project. Not quite sure why, but a --python flag would have provided a fix.)

use mamba instead of conda if available

Hi! Thanks for developing your awesome tool! Are you planning to rely on mamba in case it is installed? It is very fast compared to conda and because of that may be well suited for your project.

Reading through your package, it may be as simple as adding the following at the start in function condax.conda.ensure_conda():

def ensure_conda():
    mamba_executable = shutil.which("mamba")
    if mamba_executable:
        return mamba_executable

~ is not expanded from `.condaxrc`

From the documentation:

prefix_path: "~/.condax"
link_destination: "~/.local/bin"
channels:
    - conda-forge
    - defaults

Fails; it needs to be an absolute path - otherwise running with this file creates a folder named "~" in the current directory; "~"/.local/bin. This is because expanduser() is only applied to the default path:

link_destination: Path = Path("~").expanduser() / ".local" / "bin"

Condax 0.2.1

Cannot specify package version to install

Suppose I want to install a specific version of any package. For example python=3.9.

$ condax install python=3.9
...
Preparing transaction: ...working... done
Executing transaction: ...working... done
Traceback (most recent call last):
  File "/homes/abrahamm/.local/bin/condax", line 8, in <module>
    sys.exit(cli())
  File "/homes/abrahamm/.local/lib/python3.7/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/homes/abrahamm/.local/lib/python3.7/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/homes/abrahamm/.local/lib/python3.7/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/homes/abrahamm/.local/lib/python3.7/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/homes/abrahamm/.local/lib/python3.7/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/homes/abrahamm/.local/lib/python3.7/site-packages/condax/cli.py", line 32, in install
    core.install_package(package, channels=channel)
  File "/homes/abrahamm/.local/lib/python3.7/site-packages/condax/core.py", line 49, in install_package
    executables_to_link = conda.detemine_executables_from_env(package)
  File "/homes/abrahamm/.local/lib/python3.7/site-packages/condax/conda.py", line 133, in detemine_executables_from_env
    raise ValueError("Could not determine package files")
ValueError: Could not determine package files

condax attempts to create symlink under Windows and fails

(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.

Installing hatch succeeds but no link created for exe

conda install hatch says it succeeds but there is no link to hatch.exe created in .local\bin. The executable does exist in the program's Scripts folder though. I wonder if this is fixed by PR #61 but lack the means at the moment to build and test and with said PR.

C:\> condax install hatch
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: C:\Users\mhwilkie\.condax\hatch

  added / updated specs:
    - hatch
...snip...
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
`hatch` has been installed by condax
C:\Users\mhwilkie>dir /s/b hatch.*
C:\Users\mhwilkie\.condax\hatch
C:\Users\mhwilkie\.condax\hatch\Lib\site-packages\hatch
C:\Users\mhwilkie\.condax\hatch\Scripts\hatch.exe
C:\Users\mhwilkie\.condax\hatch\Scripts\hatch.exe.conda_trash
C:\Users\mhwilkie\.vscode\extensions\ms-python.vscode-pylance-2023.3.10\dist\bundled\stubs\matplotlib\hatch.pyi

condax version 0.1.1
Win10 Enterprise, Version 10.0.19045 Build 19045

Support Windows

Hi :)

I've just read in the docs that Windows may be supported in future depending on user interest. so I'm writing to demonstrate that there is indeed user interest for Windows support! I've regularly checked whether pipx added support for conda over the past years, I'm happy to find out it has an equivalent here.

Thanks for your work!

Cannot install from conda-forge

The documentation indicates that one can install from conda-forge:
https://github.com/mariusvniekerk/condax/blob/master/docs/installation.md#install-using-conda

However, there does not seem to be a condax package available on conda-forge:

❯ conda search condax -c conda-forge
Loading channels: done
No match found for: condax. Search: *condax*

PackagesNotFoundError: The following packages are not available from current channels:

  - condax

Current channels:

  - https://conda.anaconda.org/conda-forge/linux-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

Are there any plans to create a condax-feedstock?

Add support for micromamba

What should the default order of precedence be?

It seems clear to me that mamba > micromamba and mamba > conda. But suppose only conda and micromamba are available. Which should we prefer? (I'm very slightly leaning towards conda to prefer stability over speed. Probably I'm overthinking this, since I can't think of a reason for anyone to install micromambaconda instead of micromambamamba or condamicromamba instead of condamamba.)

Allow specifying Python version when installing a package

I'm on Windows, with an Anaconda installation.

  • python -V gives me 3.7.3
  • condax install poetry installs poetry in a venv using python 3.8.0
  • I need python 3.6 at work

I would like an option to do something like condax install --python=3.6 poetry.

Installing condax in ~/.condax?

It seems sensible to install condax itself in an isolated environment. Is

conda create --name condax --channel conda-forge --path ~/.condax/condax condax
ln -s ~/.condax/condax/bin/condax ~/.local/bin/condax

a good practice? If so, I'd be happy to update the README.

(Sidebar: would it let you use condax update condax to update itself?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.