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

Latest mamba version is not compatible with miniconda2 #640

Closed
humitos opened this issue Dec 21, 2020 · 5 comments
Closed

Latest mamba version is not compatible with miniconda2 #640

humitos opened this issue Dec 21, 2020 · 5 comments

Comments

@humitos
Copy link

humitos commented Dec 21, 2020

Hi! I'm trying to figure it out why I can't install latest mamba (0.7.6) version when using miniconda2 as base system, and instead 0.1.0 is installed.

Using miniconda2:

▶ pyenv shell miniconda2-latest
(miniconda2-latest)
~
▶ conda install -c conda-forge mamba
...
    mamba-0.1.0                |   py27hc9558a2_2          98 KB  conda-forge
...

Using miniconda3:

▶ pyenv shell miniconda3-latest
(miniconda3-latest)
~
▶ conda install -c conda-forge mamba
...
    mamba-0.7.6                |   py37h0f36c0c_0         627 KB  conda-forge
...

Latest version of mamba is not compatible with py27 miniconda version?

I'm trying to figure it out what's happening here because we want to start using mamba in Read the Docs and we currently have installed miniconda2. Installing version 0.1.0 is causing RuntimeError: Did not find key as expected in different scenarios.

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

    Traceback (most recent call last):
      File "/home/docs/.conda/lib/python2.7/site-packages/conda/exceptions.py", line 1079, in __call__
        return func(*args, **kwargs)
      File "/home/docs/.conda/lib/python2.7/site-packages/conda_env/cli/main.py", line 80, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/home/docs/.conda/lib/python2.7/site-packages/conda_env/cli/main_create.py", line 117, in execute
        result[installer_type] = installer.install(prefix, pkg_specs, args, env)
      File "/home/docs/.conda/lib/python2.7/site-packages/mamba/mamba_env.py", line 73, in mamba_install
        context.verbosity)
    RuntimeError: Did not find key as expected!

`$ /home/docs/.conda/bin/mamba create --quiet --name test-readthedocs --file rtd.yml`

     active environment : None
       user config file : /home/docs/.condarc
 populated config files : 
          conda version : 4.8.4
    conda-build version : not installed
         python version : 2.7.16.final.0
       virtual packages : __glibc=2.27
       base environment : /home/docs/.conda  (writable)
           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/docs/.conda/pkgs
       envs directories : ************
                          /home/docs/.conda/envs
               platform : linux-64
             user-agent : conda/4.8.4 requests/2.21.0 CPython/2.7.16 Linux/4.15.0-1051-aws ubuntu/18.04.5 glibc/2.27
                UID:GID : 1005:205
             netrc file : None
           offline mode : False

@wolfv
Copy link
Member

wolfv commented Dec 21, 2020

Python 2 is very much deprecated.

You can still create Python 2 environments, but your base environment has to be python3.

Just do mamba create -n somepy2env python=2 matplotlib ... to create a python 2 environment and activate with conda activate somepy2env.

Going forward we are absolutely not going to support Python 2 in base with mamba.

@wolfv wolfv closed this as completed Dec 21, 2020
@wolfv
Copy link
Member

wolfv commented Dec 21, 2020

One way to "fix" this is to update the base environment to Python3:

conda install python=3.7 mamba -c conda-forge

Would that work for readthedocs? Sorry, I only saw after my reply that this is for readthedocs :)

@wolfv wolfv reopened this Dec 21, 2020
@wolfv
Copy link
Member

wolfv commented Dec 21, 2020

Is it absolutely impossible to switch to Miniconda 3? I could try to make Python 2.7 builds, but we also moved on to use pathlib and other Python 3 goodies in the source ... so I am not convinced that this would be trivial.

@humitos
Copy link
Author

humitos commented Dec 21, 2020

Hi @wolfv! I assumed that latest versions of mamba were not compatible with Python2 because it's deprecated. However, I wanted to ask to be sure that my assumption was correct considering that conda still supports python2 but mamba doesn't.

conda install python=3.7 mamba -c conda-forge

I will give this a try. Would this first install python3.7 in the base environment and then install mamba on it using the py37 just installed? If that's correct, I assume that mamba just installed will be able to create a python2 environment, right?

Is it absolutely impossible to switch to Miniconda 3?

It is, and we are planning to do it at some point (see readthedocs/readthedocs-docker-images#86) but it's not super simple. That's why I was asking if there was already a way to do this.

I could try to make Python 2.7 builds, but we also moved on to use pathlib and other Python 3 goodies in the source ... so I am not convinced that this would be trivial.

I don't think it worth to put any effort on this. We should put the effort in our side to upgrade to miniconda3 if anything.

humitos added a commit to readthedocs/readthedocs.org that referenced this issue Dec 21, 2020
Mamba 0.1.0 is the latest version that supports Python2 (which is our default in
the conda environment --as we use miniconda2) while the current stable version
is 0.7.6

Using the older version of mamba is causing different resolution issues and
making the build to fail.

Environment still can be created with python2 or python3 versions.

See mamba-org/mamba#640 for more context.
@wolfv wolfv closed this as completed Jan 7, 2021
@wolfv
Copy link
Member

wolfv commented Jan 7, 2021

thanks for fixing this in readthedocs!

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