0

I have worked on the Colab for a long time. For some of my packages, I need to use Conda on Colab. The way I usually install conda is as follows:

!pip install conda
!pip show conda

When conda comes to install I have the following issue:

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
ERROR: Could not find a version that satisfies the requirement conda (from versions: 3.0.6, 3.5.0, 3.7.0, 3.17.0, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.7, 4.0.8, 4.0.9, 4.1.2, 4.1.6, 4.2.6, 4.2.7, 4.3.13, 4.3.16)
ERROR: No matching distribution found for conda

I am already having the following code to execute the library I have used, but as conda cannot install correctly, the program cannot run in the normal way.

!pip install -q condacolab
import condacolab
condacolab.install()

I am not sure the provided like being my answer, but any suggestion is appreciated.

A.Omidi
  • 113
  • 7
  • See duplicate. I.e., use [the Conda Incubator package `condacolab`](https://github.com/conda-incubator/condacolab). – merv May 20 '23 at 00:22
  • @merv, actually, this is not my answer. I will edit my question. – A.Omidi May 20 '23 at 09:22
  • 1
    I've reopened, but using `pip install conda` has not been working for several years - don't do that. One should use `condacolab` to install Conda. But the question is still unclear as to what the problem is after Conda is installed. – merv May 21 '23 at 03:57
  • @merv, thank you so much. Actually, I have been working with Conda on Colab for a long time. The latest work back to around 3 weeks ago and it worked well without any issues. I have developed some optimization models with PySCIPOpt and as they offered it needs to install Conda first and also Condalab. I am not aware of why this was out of service for now, but it causes some main issues on the solver side. Is there any way to install that again? However, I asked some questions on the solver forum and hope someone helps fix that. – A.Omidi May 21 '23 at 05:42
  • One of the issues that may cause and I have seen was related to the Python version that last time was 3.9 and now is 3.10. Are there any possibilities that this is throwing an error? – A.Omidi May 21 '23 at 05:46
  • Works fine for me (installs Python 3.10 Mambaforge and can load `conda` as a Python library): https://colab.research.google.com/drive/1aCxINwIxWnskrPvvxaURKsiow9OArk96?usp=sharing – merv May 22 '23 at 01:25
  • @merv, thank you so much. This can solve some of my issues. If you would like to add your comment as an answer, I am glad to accept that. – A.Omidi May 22 '23 at 06:15
  • 1
    The answer is same as the proposed duplicate: https://stackoverflow.com/a/75239829/570918 (you are welcome to upvote there). – merv May 22 '23 at 16:21

0 Answers0