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

Creating conda env failed with exit code null #262

Open
lczech opened this issue Nov 18, 2022 · 1 comment
Open

Creating conda env failed with exit code null #262

lczech opened this issue Nov 18, 2022 · 1 comment

Comments

@lczech
Copy link

lczech commented Nov 18, 2022

Hi there,

this error is similar to #116, but yet seems to be a different error, or caused by a different problem.

My GitHub Action step looks like this:

- name: Setup Conda
  uses: conda-incubator/setup-miniconda@v2.2.0
  with:
    environment-file: envs/grenepipe.yaml
    activate-environment: grenepipe

This results in the following error:

Updating 'grenepipe' env from conda env update...
  /usr/share/miniconda/condabin/conda env update --name grenepipe --file envs/grenepipe.yaml
  Collecting package metadata (repodata.json): ...working... done
  Solving environment: ...working... ::endgroup::
Error: The process '/usr/share/miniconda/condabin/conda' failed with exit code null

(that's the part that seems similar to #116).

I investigated a bit, and ran the command there (conda env update --name grenepipe --file envs/grenepipe.yaml) locally on my machine (Ubuntu 20.04.5 LTS), with conda 22.9.0, and got an error as well:

ModuleNotFoundError: No module named '_sysconfigdata_x86_64_conda_cos7_linux_gnu'
Full output
> conda env create --name grenepipe-update-test --file envs/grenepipe.yaml

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

  Traceback (most recent call last):
    File "/home/lucas/Software/miniconda/lib/python3.8/argparse.py", line 1800, in parse_known_args
      namespace, args = self._parse_known_args(args, namespace)
    File "/home/lucas/Software/miniconda/lib/python3.8/argparse.py", line 1988, in _parse_known_args
      positionals_end_index = consume_positionals(start_index)
    File "/home/lucas/Software/miniconda/lib/python3.8/argparse.py", line 1965, in consume_positionals
      take_action(action, args)
    File "/home/lucas/Software/miniconda/lib/python3.8/argparse.py", line 1858, in take_action
      argument_values = self._get_values(action, argument_strings)
    File "/home/lucas/Software/miniconda/lib/python3.8/argparse.py", line 2399, in _get_values
      self._check_value(action, value[0])
    File "/home/lucas/Software/miniconda/lib/python3.8/argparse.py", line 2446, in _check_value
      raise ArgumentError(action, msg % args)
  argparse.ArgumentError: argument command: invalid choice: 'env' (choose from 'clean', 'compare', 'config', 'create', 'info', 'init', 'install', 'list', 'package', 'remove', 'rename', 'run', 'search', 'uninstall', 'update', 'upgrade', 'notices')
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/home/lucas/Software/miniconda/lib/python3.8/site-packages/conda/exceptions.py", line 1129, in __call__
      return func(*args, **kwargs)
    File "/home/lucas/Software/miniconda/lib/python3.8/site-packages/conda/cli/main.py", line 75, in main_subshell
      args = p.parse_args(args)
    File "/home/lucas/Software/miniconda/lib/python3.8/argparse.py", line 1768, in parse_args
      args, argv = self.parse_known_args(args, namespace)
    File "/home/lucas/Software/miniconda/lib/python3.8/argparse.py", line 1807, in parse_known_args
      self.error(str(err))
    File "/home/lucas/Software/miniconda/lib/python3.8/site-packages/conda/cli/conda_argparse.py", line 154, in error
      executable = find_executable('conda-' + cmd)
    File "/home/lucas/Software/miniconda/lib/python3.8/site-packages/conda/cli/find_commands.py", line 25, in find_executable
      dir_paths = [join(p, basename(sysconfig.get_path('scripts')))
    File "/home/lucas/Software/miniconda/lib/python3.8/site-packages/conda/cli/find_commands.py", line 25, in <listcomp>
      dir_paths = [join(p, basename(sysconfig.get_path('scripts')))
    File "/home/lucas/Software/miniconda/lib/python3.8/sysconfig.py", line 521, in get_path
      return get_paths(scheme, vars, expand)[name]
    File "/home/lucas/Software/miniconda/lib/python3.8/sysconfig.py", line 511, in get_paths
      return _expand_vars(scheme, vars)
    File "/home/lucas/Software/miniconda/lib/python3.8/sysconfig.py", line 172, in _expand_vars
      _extend_dict(vars, get_config_vars())
    File "/home/lucas/Software/miniconda/lib/python3.8/sysconfig.py", line 559, in get_config_vars
      _init_posix(_CONFIG_VARS)
    File "/home/lucas/Software/miniconda/lib/python3.8/sysconfig.py", line 430, in _init_posix
      _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
  ModuleNotFoundError: No module named '_sysconfigdata_x86_64_conda_cos7_linux_gnu'

`$ /home/lucas/Software/miniconda/bin/conda env create --name grenepipe-update-test --file envs/grenepipe.yaml`

environment variables:
               CIO_TEST=<not set>
      CMAKE_PREFIX_PATH=/home/lucas/Software/miniconda:/home/lucas/Software/miniconda/x86_64-c
                        onda-linux-gnu/sysroot/usr
    CONDA_BUILD_SYSROOT=/home/lucas/Software/miniconda/x86_64-conda-linux-gnu/sysroot
      CONDA_DEFAULT_ENV=base
              CONDA_EXE=/home/lucas/Software/miniconda/bin/conda
           CONDA_PREFIX=/home/lucas/Software/miniconda
  CONDA_PROMPT_MODIFIER=(base)
       CONDA_PYTHON_EXE=/home/lucas/Software/miniconda/bin/python
             CONDA_ROOT=/home/lucas/Software/miniconda
            CONDA_SHLVL=1
         CURL_CA_BUNDLE=<not set>
          DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
         MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
                   PATH=/home/lucas/Software/miniconda/bin:/home/lucas/Software/miniconda/cond
                        abin:/home/lucas/.cargo/bin:/home/lucas/.local/bin:/usr/local/sbin:/us
                        r/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:
                        /snap/bin
     REQUESTS_CA_BUNDLE=<not set>
          SSL_CERT_FILE=<not set>
   TERMINATOR_DBUS_PATH=/net/tenshu/Terminator2
             WINDOWPATH=2

   active environment : base
  active env location : /home/lucas/Software/miniconda
          shell level : 1
     user config file : /home/lucas/.condarc
populated config files : 
        conda version : 22.9.0
  conda-build version : not installed
       python version : 3.8.5.final.0
     virtual packages : __linux=5.15.0=0
                        __glibc=2.31=0
                        __unix=0=0
                        __archspec=1=x86_64
     base environment : /home/lucas/Software/miniconda  (writable)
    conda av data dir : /home/lucas/Software/miniconda/etc/conda
conda av metadata url : None
         channel URLs : 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
        package cache : /home/lucas/Software/miniconda/pkgs
                        /home/lucas/.conda/pkgs
     envs directories : /home/lucas/Software/miniconda/envs
                        /home/lucas/.conda/envs
             platform : linux-64
           user-agent : conda/22.9.0 requests/2.28.1 CPython/3.8.5 Linux/5.15.0-52-generic ubuntu/20.04.5 glibc/2.31
              UID:GID : 1000:1000
           netrc file : None
         offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers? [y/N]: y
Upload successful.

Thank you for helping to improve conda.
Opt-in to always sending reports (and not see this message again)
by running

  $ conda config --set report_errors true

That looks more like an issue with conda than with setup-miniconda. The whole thing works nicely once I add mamba-version: "*" to the GitHub Action with: clause. This confirms that this issue is with conda.

However, I'm still opening the issue here in order to suggest that the output of the Action includes the full conda error output, to make debugging easier.

Cheers
Lucas

@AngryMaciek
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants