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

Specifying channel::pkg_name errors under certain conditions #269

Closed
2 tasks done
travishathaway opened this issue Aug 26, 2023 · 3 comments
Closed
2 tasks done

Specifying channel::pkg_name errors under certain conditions #269

travishathaway opened this issue Aug 26, 2023 · 3 comments
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@travishathaway
Copy link
Contributor

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

When I run the following command:

conda create -n blerp -c conda-forge pytorch::pytorch ultralytics torchvision pytorch-cuda=11.8 --solver=libmamba

I get the following error:

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda_libmamba_solver/solver.py", line 575, in _str_to_matchspec
        name, version, build = spec.rsplit("-", 2)
        ^^^^^^^^^^^^^^^^^^^^
    ValueError: not enough values to unpack (expected 3, got 1)

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda/exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda/cli/main.py", line 64, in main_subshell
        exit_code = do_call(args, parser)
                    ^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda/cli/conda_argparse.py", line 167, in do_call
        result = getattr(module, func_name)(args, parser)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda/notices/core.py", line 124, in wrapper
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda/cli/main_create.py", line 50, in execute
        install(args, parser, "create")
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda/cli/install.py", line 316, in install
        unlink_link_transaction = solver.solve_for_transaction(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda/core/solve.py", line 154, in solve_for_transaction
        unlink_precs, link_precs = self.solve_for_diff(
                                   ^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda/core/solve.py", line 215, in solve_for_diff
        final_precs = self.solve_final_state(
                      ^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda_libmamba_solver/solver.py", line 215, in solve_final_state
        out_state = self._solving_loop(in_state, out_state, index)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda_libmamba_solver/solver.py", line 302, in _solving_loop
        solved = self._solve_attempt(in_state, out_state, index)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda_libmamba_solver/solver.py", line 378, in _solve_attempt
        new_conflicts = self._maybe_raise_for_problems(problems, old_conflicts)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda_libmamba_solver/solver.py", line 635, in _maybe_raise_for_problems
        problems = self._parse_problems(problems)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda_libmamba_solver/solver.py", line 615, in _parse_problems
        conflicts.append(cls._str_to_matchspec(words[-1]))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/user-account/opt/conda_x86_64/lib/python3.11/site-packages/conda_libmamba_solver/solver.py", line 585, in _str_to_matchspec
        raise ValueError(f"Could not parse spec: {spec}") from exc
    ValueError: Could not parse spec: pytorch::pytorch

`$ /Users/user-account/opt/conda_x86_64/bin/conda create -n blerp -c conda-forge pytorch::pytorch ultralytics torchvision pytorch-cuda=11.8 --solver=libmamba`

  environment variables:
                 CIO_TEST=<not set>
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=/Users/user-account/opt/conda_x86_64/bin/conda
             CONDA_PREFIX=/Users/user-account/opt/conda_x86_64
    CONDA_PROMPT_MODIFIER=false
         CONDA_PYTHON_EXE=/Users/user-account/opt/conda_x86_64/bin/python
               CONDA_ROOT=/Users/user-account/opt/conda_x86_64
              CONDA_SHLVL=1
           CURL_CA_BUNDLE=<not set>
               LD_PRELOAD=<not set>
                     PATH=/Users/user-account/opt/conda_x86_64/bin:/Users/user-account/opt/c
                          onda_x86_64/condabin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/u
                          sr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library
                          /TeX/texbin:/Users/user-account/.cargo/bin:/Users/user-account/Lib
                          rary/Application Support/JetBrains/Toolbox/scripts:/Users/user-account
                          /bin:/Users/user-account/.local/bin:/opt/homebrew/opt/fzf/bin
         PYTHONNOUSERSITE=1
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : base
    active env location : /Users/user-account/opt/conda_x86_64
            shell level : 1
       user config file : /Users/user-account/.condarc
 populated config files : /Users/user-account/.condarc
          conda version : 23.7.2
    conda-build version : not installed
         python version : 3.11.4.final.0
       virtual packages : __archspec=1=x86_64
                          __osx=12.2.1=0
                          __unix=0=0
       base environment : /Users/user-account/opt/conda_x86_64  (writable)
      conda av data dir : /Users/user-account/opt/conda_x86_64/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/user-account/opt/conda_x86_64/pkgs
                          /Users/user-account/.conda/pkgs
       envs directories : /Users/user-account/opt/conda_x86_64/envs
                          /Users/user-account/.conda/envs
               platform : osx-64
             user-agent : conda/23.7.2 requests/2.31.0 CPython/3.11.4 Darwin/21.3.0 OSX/12.2.1 solver/libmamba conda-libmamba-solver/23.7.0 libmambapy/1.4.8
                UID:GID : 501:20
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>

But, when I run:

conda create -n blerp pytorch::pytorch  --solver=libmamba

Everything works fine. Not sure what's causing the error here 🤷.

Conda Info

See the error report above.

Conda Config

channels:
  - defaults

Conda list

n/a

Additional Context

No response

@travishathaway travishathaway added the type::bug describes erroneous operation, use severity::* to classify the type label Aug 26, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Aug 26, 2023
@travishathaway travishathaway changed the title Specifying "<channel>::<package" errors under certain conditions Specifying <channel>::<package errors under certain conditions Aug 26, 2023
@travishathaway travishathaway changed the title Specifying <channel>::<package errors under certain conditions Specifying channel::pkg_name errors under certain conditions Aug 26, 2023
@jaimergp
Copy link
Contributor

This is an unfortunate consequence of the newline issue reported for libmamba 1.4.5, fixed in 1.5.0. The parsing code gets a red herring (because all error lines are merged in a single one), and it tries to parse things in the wrong way. Will be fixed by #242 (or a successor).

@jaimergp
Copy link
Contributor

This is the error message you should see if you update to libmamba 1.5.0:

Could not solve for environment specs
The following packages are incompatible
├─ pytorch does not exist (perhaps a typo or a missing channel);
└─ pytorch-cuda 11.8**  is not installable because it requires
   └─ cuda 11.8.* , which does not exist (perhaps a missing channel).

@jaimergp
Copy link
Contributor

Closed by #270

@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning Sep 15, 2023
@jaimergp jaimergp added this to the September 2023 release milestone Sep 15, 2023
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 28, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

No branches or pull requests

2 participants