0

I cannot install Python 3.9 using conda environment.

conda create --name demo-env python=3.9
WARNING: A conda environment already exists at '/XXXXXX'
Remove existing environment (y/[n])? y

Collecting package metadata: / Unable to retrieve repodata (404 error) for https://repo.anaconda.com/pkgs/main/noardone
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - python=3.9

Current channels:

  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/free/linux-64
  - https://repo.anaconda.com/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.```
Exploring
  • 2,493
  • 11
  • 56
  • 97
  • 1
    This warning seems like the source of the problem: `Unable to retrieve repodata (404 error) for https://repo.anaconda.com/pkgs/main/noardone`. There may be something wrong with your anaconda installation? – joanis Aug 20 '22 at 01:29
  • Actually, I just tried `curl https://repo.anaconda.com/` and that's giving me an error too, about their certificates. There may be a problem with the anaconda site at the moment, I'm not sure. My miniconda setup, however, did not have to fetch that url, so it worked fine, for what it's worth. – joanis Aug 20 '22 at 01:32
  • So what is the solution? – Exploring Aug 20 '22 at 02:04
  • I cannot reproduce the error, so that's hard to say. Try from a fresh miniconda install? Your command should have worked. (Although I always use == instead of just =, but I am pretty sure that won't change anything here.) – joanis Aug 20 '22 at 02:22
  • Does this answer your question? [How to install python with conda?](https://stackoverflow.com/questions/63216201/how-to-install-python-with-conda) – mrk Dec 20 '22 at 10:22

1 Answers1

1

As discussed in this post and based on your terminal output, python 3.9 doesn't exist there yet on any channels, and will need to be installed.

Perhaps try:

conda create -c conda-forge python=3.9 -n demo-env

Here, adding -c conda-forge will search the conda-forge channel

jmsm1g19
  • 46
  • 6
  • 2
    Standard conda channels already include both Python 3.9 and 3.10, so this should not be the problem. – joanis Aug 20 '22 at 01:33