Installing the legacy version of fenics

I’m trying to install the legacy version of fenics on Anaconda. I’m following the instruction shown in https://fenicsproject.org/download/archive/.
As shown in the above link, when I run

conda create -n fenicsproject -c conda-forge fenics

I encountered the following error:

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

    Traceback (most recent call last):
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/exceptions.py", line 1082, in __call__
        return func(*args, **kwargs)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/cli/main.py", line 87, in _main
        exit_code = do_call(args, p)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 84, in do_call
        return getattr(module, func_name)(args, parser)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/cli/main_create.py", line 41, in execute
        install(args, parser, 'create')
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/cli/install.py", line 264, in install
        should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/core/solve.py", line 155, in solve_for_transaction
        should_retry_solve)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/core/solve.py", line 196, in solve_for_diff
        force_remove, should_retry_solve)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/core/solve.py", line 300, in solve_final_state
        ssc = self._collect_all_metadata(ssc)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
        return f(*args, **kwds)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/core/solve.py", line 463, in _collect_all_metadata
        index, r = self._prepare(prepared_specs)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/core/solve.py", line 1059, in _prepare
        self.subdirs, prepared_specs, self._repodata_fn)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/core/index.py", line 291, in get_reduced_index
        push_record(record)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/core/index.py", line 265, in push_record
        combined_depends = record.combined_depends
      File "/lfs/turing3/0/takashi279/miniconda37/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 "/lfs/turing3/0/takashi279/miniconda37/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 "/lfs/turing3/0/takashi279/miniconda37/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 "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/models/match_spec.py", line 509, in _merge
        final = this_component.merge(that_component)
      File "/lfs/turing3/0/takashi279/miniconda37/lib/python3.7/site-packages/conda/models/match_spec.py", line 761, in merge
        % (self.raw_value, other.raw_value))
    ValueError: Incompatible component merge:
      - '*complex*'
      - 'complex_*'

Am I missing any dependencies? Any help would be really appreciated.

I have the same problem. The same error message also pops up when I try to install new packages to an already existing conda environment where fenics is installed.

It would be great if could write a comment here if you figured out how to fix it.

See Conda installation Issues · Issue #2259 · FEniCS/dolfinx · GitHub
You can use mamba as a workaround.

1 Like

The answer in #2259 worked for me! Thanks!