2

I have miniconda installed on my mac os 10.13.6 and I want to install PyPy3.7 in the same conda environment where I already have installed Python3.9. However, when I try to install PyPy I get the following dependency errors.

(my_conda_env)$ conda install -c conda-forge pypy3.7
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: - 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                             

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package ncurses conflicts for:
python=3.9 -> readline[version='>=8.0,<9.0a0'] -> ncurses[version='>=6.1,<6.3.0a0|>=6.1,<7.0a0']
python=3.9 -> ncurses[version='>=6.2,<6.3.0a0|>=6.2,<7.0a0']

Package openssl conflicts for:
python=3.9 -> openssl[version='>=1.1.1h,<1.1.2a|>=1.1.1i,<1.1.2a|>=1.1.1j,<1.1.2a|>=1.1.1k,<1.1.2a']
pypy3.7 -> openssl[version='>=1.1.1i,<1.1.2a|>=1.1.1k,<1.1.2a']

Package libcxx conflicts for:
python=3.9 -> libcxx[version='>=10.0.0|>=10.0.1|>=11.0.0|>=11.0.1']
python=3.9 -> libffi[version='>=3.3,<3.4.0a0'] -> libcxx[version='>=4.0.1|>=9.0.1']

Which is rather strange as two out of the three conflicts seem to be due to python3.9 clashing with itself. Moreover, as you can see from the information below, the installed versions of openssl, ncurses and libcxx should satisfy all the constraints above. Any help?

(my_conda_env)$ conda list
# packages in environment at /Users/Sirion/miniconda3/envs/ro:
#
# Name                    Version                   Build  Channel
...
libcxx                    11.1.0               habf9029_0    conda-forge
libffi                    3.3                  h046ec9c_2    conda-forge
...
ncurses                   6.2                  h2e338ed_4    conda-forge
...
openssl                   1.1.1k               h0d85af4_0    conda-forge
...
python                    3.9.4           h9133fd0_0_cpython    conda-forge
python_abi                3.9                      1_cp39    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
...

(my_conda_env)$ conda info

     active environment : my_conda_env
    active env location : -- OMISSIS --
            shell level : 2
       user config file : -- OMISSIS --
 populated config files : -- OMISSIS --
          conda version : 4.10.1
    conda-build version : not installed
         python version : 3.8.0.final.0
       virtual packages : __osx=10.13.6=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : -- OMISSIS --  (writable)
      conda av data dir : -- OMISSIS --
  conda av metadata url : https://repo.anaconda.com/pkgs/main
           channel URLs : http://conda.anaconda.org/gurobi/osx-64
                          http://conda.anaconda.org/gurobi/noarch
                          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 : -- OMISSIS --
                          -- OMISSIS --
       envs directories : -- OMISSIS --
                          -- OMISSIS --
               platform : osx-64
             user-agent : conda/4.10.1 requests/2.25.1 CPython/3.8.0 Darwin/17.7.0 OSX/10.13.6
                UID:GID : 501:20
             netrc file : None
           offline mode : False
Sirion
  • 804
  • 1
  • 11
  • 33

1 Answers1

3

Not possible. Conda's conflict reporting is not reliable. Running instead with mamba clearly identifies that pypy3.7 has a python=3.7 constraint, i.e., one can't co-install Python 3.9 in the same environment.

Mamba Output

$ mamba create -n foo python=3.9 pypy3.7

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.11.1) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['python=3.9', 'pypy3.7']

bioconda/osx-64          [====================] (00m:01s) Done
bioconda/noarch          [====================] (00m:01s) Done
pkgs/r/noarch            [====================] (00m:00s) No change
pkgs/r/osx-64            [====================] (00m:00s) No change
pkgs/main/osx-64         [====================] (00m:01s) Done
pkgs/main/noarch         [====================] (00m:00s) Done
conda-forge/noarch       [====================] (00m:01s) Done
conda-forge/osx-64       [====================] (00m:04s) Done

Encountered problems while solving:
  - package pypy3.7-7.3.3-hb2afd79_3 has constraint python 3.7.* *_73_pypy conflicting with python-3.9.0-h88f2d9e_1
merv
  • 67,214
  • 13
  • 180
  • 245
  • Hi, thank you for the detailed answer, just a quick side question: I have never heard of `mamba` until now but at a first glance it seems to be build as a better replacement for conda, is there any issue to be aware of if I decide to switch from conda to mamba (my needs are quite simple)? – Sirion May 17 '21 at 19:48
  • 1
    @Sirion I haven't had any issues since adopting it (~6 months). There's been chatter in Conda Forge to adopt it as the primary solver on the CI infrastructure. Also, Snakemake, a major pipeline tool for bioinformatics, fully switch to a Mamba default recently. So I think there is good uptake, i.e., enough people are using it that if there were major problems they'd have come up ([see Issues](https://github.com/mamba-org/mamba/issues)). – merv May 17 '21 at 20:03
  • 1
    @Sirion also, `mamba` is a simple add-on to any Conda installation: `conda install -n base conda-forge::mamba`. Then you just use `mamba` wherever you would normally use `conda` (except for `conda activate`). – merv May 18 '21 at 00:28