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

Cannot install pyne with conda on ubuntu #1452

Closed
vsisl opened this issue May 24, 2022 · 5 comments
Closed

Cannot install pyne with conda on ubuntu #1452

vsisl opened this issue May 24, 2022 · 5 comments

Comments

@vsisl
Copy link

vsisl commented May 24, 2022

Describe the Bug

I'm unable to install pyne using conda on ubuntu 20.04.

To Reproduce

My environment.yml file:

name: my_env
channels:
  - conda-forge
dependencies:
  - python=3.7.12
  - pyne=0.7
  - pandas=1.3.5
  - xlrd=2.0.1
  - openpyxl=3.0.9              
  - jupyter=1.0.0
  - nbformat=5.2.0              
  - plotly=5.6.0
  - matplotlib=3.5.1
  - tqdm=4.64.0                 

Executing:

$ conda env create -f environment.yml

results into:

Collecting package metadata (repodata.json): failed

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

    Traceback (most recent call last):
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1082, in __call__
        return func(*args, **kwargs)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda_env/cli/main.py", line 80, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda_env/cli/main_create.py", line 142, in execute
        result[installer_type] = installer.install(prefix, pkg_specs, args, env)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda_env/installers/conda.py", line 51, in install
        prune=getattr(args, 'prune', False), update_modifier=UpdateModifier.FREEZE_INSTALLED)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/core/solve.py", line 155, in solve_for_transaction
        should_retry_solve)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/core/solve.py", line 196, in solve_for_diff
        force_remove, should_retry_solve)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/core/solve.py", line 300, in solve_final_state
        ssc = self._collect_all_metadata(ssc)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
        return f(*args, **kwds)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/core/solve.py", line 463, in _collect_all_metadata
        index, r = self._prepare(prepared_specs)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/core/solve.py", line 1059, in _prepare
        self.subdirs, prepared_specs, self._repodata_fn)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/core/index.py", line 291, in get_reduced_index
        push_record(record)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/core/index.py", line 265, in push_record
        combined_depends = record.combined_depends
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/models/records.py", line 340, in combined_depends
        result = {ms.name: ms for ms in MatchSpec.merge(self.depends)}
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/models/match_spec.py", line 478, in merge
        reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/models/match_spec.py", line 478, in <lambda>
        reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/models/match_spec.py", line 509, in _merge
        final = this_component.merge(that_component)
      File "/home/user/miniconda3/lib/python3.7/site-packages/conda/models/match_spec.py", line 761, in merge
        % (self.raw_value, other.raw_value))
    ValueError: Incompatible component merge:
      - 'mpi_mpich_*'
      - 'mpi_mpich_tempest*'

`$ /home/user/miniconda3/bin/conda-env create -f environment.yml`

  environment variables:
                 CIO_TEST=<not set>
  CONDA_AUTO_UPDATE_CONDA=false
        CONDA_DEFAULT_ENV=nuclear
                CONDA_EXE=/home/user/miniconda3/bin/conda
             CONDA_PREFIX=/home/user/miniconda3/envs/nuclear
           CONDA_PREFIX_1=/home/user/miniconda3
           CONDA_PREFIX_2=/home/user/miniconda3/envs/scale_postproc
    CONDA_PROMPT_MODIFIER=(nuclear)
         CONDA_PYTHON_EXE=/home/user/miniconda3/bin/python
               CONDA_ROOT=/home/user/miniconda3
              CONDA_SHLVL=3
           CURL_CA_BUNDLE=<not set>
                 DATAPATH=/home/user/MCNP620/MCNP_DATA
                     PATH=/home/user/miniconda3/bin:/home/user/MCNP620/MCNP_CODE/bin:/home/nag
                          ra/MCNP/MCNP_CODE/bin:/home/user/scale/SCALE-6.2/bin:/home/user/mini
                          conda3/envs/nuclear/bin:/home/user/miniconda3/condabin:/usr/local/sbi
                          n:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/g
                          ames:/snap/bin
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
            XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
         XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0

     active environment : nuclear
    active env location : /home/user/miniconda3/envs/nuclear
            shell level : 3
       user config file : /home/user/.condarc
 populated config files : 
          conda version : 4.12.0
    conda-build version : not installed
         python version : 3.7.7.final.0
       virtual packages : __linux=5.4.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/user/miniconda3  (writable)
      conda av data dir : /home/user/miniconda3/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/user/miniconda3/pkgs
                          /home/user/.conda/pkgs
       envs directories : /home/user/miniconda3/envs
                          /home/user/.conda/envs
               platform : linux-64
             user-agent : conda/4.12.0 requests/2.27.1 CPython/3.7.7 Linux/5.4.0-107-generic ubuntu/20.04.4 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]:

Expected Behavior

I expect the environment to be created.

Information regarding my system:

  • OS: Ubuntu 20.04
  • PyNE Version: 0.7
  • Versions of dependencies installed with:
    • conda 4.12.0
@welcome
Copy link

welcome bot commented May 24, 2022

Hi, and welcome to PyNE! 👋 Thanks for opening your first issue. We recommend that you include information such as the version of PyNE you're working with (eg, develop branch or a specific version), the platform you are operating on, the expected behavior, and the actual behavior you are bringing our attention to. The more deatil you provide, the better others in this community will be able to help you.

@shimwell
Copy link
Contributor

Perhaps linked to this issue conda/conda#11442

@kkiesling
Copy link
Contributor

You might be able to temporarily get around this by using mamba for install instead of conda. I don't know the syntax off hand for using mamba with an environment file, but I am guessing it is similar.

@shimwell
Copy link
Contributor

Perhaps one can use conda to create an empty environment then use mamba to add to the environment

conda create --name empty_env python=3.9
mamba env update --name empty_env --file environment.yml

@vsisl
Copy link
Author

vsisl commented May 24, 2022

Thank you @kkiesling , this was a really helpful advice and it solved my problem!

All I had to do was:

  1. Install mamba:
$ conda install mamba -n base -c conda-forge
  1. create my environment with mamba instead of conda:
$ mamba env create -f environment.yml
  1. activate my environment and start using it:
$ conda activate my_env

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

3 participants