Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why conda cannot create environment with python=3.4 installed in it

I have miniconda 3 installation and want to create conda environment with Python 3.4. I used the command: conda create -n myenv python=3.4 and get the error:

PackagesNotFoundError: The following packages are not available from current channels:
  - python=3.4

I tried to change the version to 3.7, typing conda create -n myenv python=3.7 There was no error with version 3.7. So the problem seems to be related with the older versions of python.

This is the full output with the error message:

Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: failed

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

  - python=3.4

Current channels:

  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/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.
like image 752
ABC Avatar asked Jul 02 '19 10:07

ABC


Video Answer


2 Answers

The reason you are not able to install python 3.4 package is that it is not available in the default channel of anaconda from where you are trying to install.

However, I just checked that it is available in the conda-forge channel. So, it can be installed as below:

conda create -n myenv python=3.4 -c conda-forge

like image 168
Ashwin Geet D'Sa Avatar answered Oct 08 '22 13:10

Ashwin Geet D'Sa


It seems to me that Python 3.4 is not available in any of your listed repositories. I've tried to create an environment with it in Anaconda and it worked. Try to update Miniconda first:

conda update -n base -c defaults conda

If it does not work, look for a repository containing Python 3.4 and add it to your list of repositories.

like image 29
W Barreto Avatar answered Oct 08 '22 12:10

W Barreto