0

I can't install conda from my new python3.8 environment.

When I do

sudo python3.8 -m pip install conda

I get this error:

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 see that conda has been yanked from pypi but I have some other librairies that have dependencies with conda.

What can I do?

wjandrea
  • 28,235
  • 9
  • 60
  • 81
  • 1
    Did you read the whole PyPI page? *"It is the package manager used by [Anaconda](http://docs.continuum.io/anaconda/index.html) installations ... Currently supported install methods include the Anaconda installer and the miniconda installer. You can download the miniconda installer from [https://conda.io/miniconda.html](https://conda.io/miniconda.html)."* – wjandrea May 26 '23 at 16:25
  • 2
    BTW, [you probably don't want to use `sudo pip`](/q/21055859/4518341). – wjandrea May 26 '23 at 16:32
  • You can try providing a specific version: https://pypi.org/help/#yanked – topsail May 26 '23 at 16:33
  • @topsail I wouldn't do that. It seems to be sorely out of date (version 4.3.16, released Apr 22, 2017 vs [latest version](https://anaconda.org/anaconda/conda) 23.5.0, released yesterday). – wjandrea May 26 '23 at 17:22
  • 1
    @wjandrea I understand, the thing is that I am in an ipykernel env, it has conda installed, it uses python3.8 to run kernels (in my jupyter) and when I want to install other libraries that has conda as dependecies, it fails like so : Collecting cmdstanpy Using cached cmdstanpy-1.1.0-py3-none-any.whl (83 kB) 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 – Stevens Laurent May 26 '23 at 17:27
  • 1
    @Stevens Oh! If it's already installed, there's no reason to try installing it again. It looks like you should use `conda install` to install `cmdstanpy`, since it's [in the Anaconda repo](https://anaconda.org/anaconda/cmdstanpy). **Edit**: it has more detailed installation instructions in [its docs](https://cmdstanpy.readthedocs.io/en/v1.1.0/installation.html). BTW, beware the [XY problem](https://meta.stackexchange.com/q/66377/343832) – wjandrea May 26 '23 at 17:34

3 Answers3

1

Conda is not installable via pip, use the source instead

0

In a comment, you said conda is already installed. So, there's no reason to try installing it again in the first place; this is an XY problem.

Instead, you should probably use conda install for the libraries you need. You mentioned cmdstanpy, which is in the Anaconda repo and suggests conda first in the detailed installation instructions in its docs. That said, cmdstanpy doesn't seem to depend on conda from what I can tell, so the error is probably caused by another package. I'd need to see the exact command you ran in the first place and the full output to be able to tell for sure.

wjandrea
  • 28,235
  • 9
  • 60
  • 81
-1

Install official distribution conda at the official site. conda is not a package.

wjandrea
  • 28,235
  • 9
  • 60
  • 81
  • It ***is*** a package, but it's been yanked. Apart from that, [JL already posted the same thing](/a/76342919/4518341). – wjandrea May 26 '23 at 17:30
  • `conda` is an *import package* which, among other things, provides an alternate *distribution package* manager. (See the https://packaging.python.org/en/latest/glossary/#glossary for more information.) – chepner May 26 '23 at 17:57