# eric7.CondaInterface.Conda

Package implementing the conda GUI logic.

### Global Attributes

None

### Classes

Conda | Class implementing the conda GUI logic.

### Functions

None

## Conda

Class implementing the conda GUI logic.

### Signals

condaEnvironmentCreated()
  emitted to indicate the creation of a new environment
condaEnvironmentRemoved()
  emitted to indicate the removal of an environment

### Derived from

QObject

### Class Attributes

RootName

### Class Methods

None

### Methods

Conda | Constructor
cleanConda | Public method to update conda itself.
createCondaEnvironment | Public method to create a conda environment.
getCondaEnvironmentsList | Public method to get a list of all Conda environments.
getCondaInformation | Public method to get a dictionary containing information about conda.
getInstalledPackages | Public method to get a list of installed packages of a conda environment.
getUpdateablePackages | Public method to get a list of updateable packages of a conda environment.
installPackages | Public method to install packages into a conda environment.
removeCondaEnvironment | Public method to remove a conda environment.
runProcess | Public method to execute the conda with the given arguments.
searchPackages | Public method to search for a package pattern of a conda environment.
uninstallPackages | Public method to uninstall packages of a conda environment (including all no longer needed dependencies).
updateAllPackages | Public method to update all packages of a conda environment.
updateConda | Public method to update conda itself.
updatePackages | Public method to update packages of a conda environment.
writeDefaultConfiguration | Public method to create a conda configuration with default values.

### Static Methods

None

#### Conda (Constructor)

Conda(parent=None)

Constructor

parent (QObject)
  parent

#### Conda.cleanConda

cleanConda(cleanAction)

Public method to update conda itself.

cleanAction (str)
  cleaning action to be performed (must be one of the command line parameters without '--')

#### Conda.createCondaEnvironment

createCondaEnvironment(arguments)

Public method to create a conda environment.

arguments (list of str)
  list of command line arguments

Return:
  tuple containing a flag indicating success, the directory of the created environment (aka. prefix) and the corresponding Python interpreter

Return Type:
  tuple of (bool, str, str)

#### Conda.getCondaEnvironmentsList

getCondaEnvironmentsList()

Public method to get a list of all Conda environments.

Return:
  list of tuples containing the environment name and prefix

Return Type:
  list of tuples of (str, str)

#### Conda.getCondaInformation

getCondaInformation()

Public method to get a dictionary containing information about conda.

Return:
  dictionary containing information about conda

Return Type:
  dict

#### Conda.getInstalledPackages

getInstalledPackages(name="", prefix="")

Public method to get a list of installed packages of a conda environment.

name (str)
  name of the environment
prefix (str)
  prefix of the environment

Return:
  list of installed packages. Each entry is a tuple containing the package name, version and build.

Return Type:
  list of tuples of (str, str, str)

Raises RuntimeError:
  raised to indicate an error in parameters Note: only one of name or prefix must be given.

#### Conda.getUpdateablePackages

getUpdateablePackages(name="", prefix="")

Public method to get a list of updateable packages of a conda environment.

name (str)
  name of the environment
prefix (str)
  prefix of the environment

Return:
  list of installed packages. Each entry is a tuple containing the package name, version and build.

Return Type:
  list of tuples of (str, str, str)

Raises RuntimeError:
  raised to indicate an error in parameters Note: only one of name or prefix must be given.

#### Conda.installPackages

installPackages(packages, name="", prefix="")

Public method to install packages into a conda environment.

packages (list of str)
  list of package names to be installed
name (str)
  name of the environment
prefix (str)
  prefix of the environment

Return:
  flag indicating success

Return Type:
  bool

Raises RuntimeError:
  raised to indicate an error in parameters Note: only one of name or prefix must be given.

#### Conda.removeCondaEnvironment

removeCondaEnvironment(name="", prefix="")

Public method to remove a conda environment.

name (str)
  name of the environment
prefix (str)
  prefix of the environment

Return:
  flag indicating success

Return Type:
  bool

Raises RuntimeError:
  raised to indicate an error in parameters Note: only one of name or prefix must be given.

#### Conda.runProcess

runProcess(args)

Public method to execute the conda with the given arguments.

The conda executable is called with the given arguments and waited for its end.

args (list of str)
  list of command line arguments

Return:
  tuple containing a flag indicating success and the output of the process

Return Type:
  tuple of (bool, str)

#### Conda.searchPackages

searchPackages(pattern, fullNameOnly=False, packageSpec=False, platform="", name="", prefix="", )

Public method to search for a package pattern of a conda environment.

pattern (str)
  package search pattern
fullNameOnly (bool)
  flag indicating to search for full names only
packageSpec (bool)
  flag indicating to search a package specification
platform (str)
  type of platform to be searched for
name (str)
  name of the environment
prefix (str)
  prefix of the environment

Return:
  flag indicating success and a dictionary with package name as key and list of dictionaries containing detailed data for the found packages as values

Return Type:
  tuple of (bool, dict of list of dict)

Raises RuntimeError:
  raised to indicate an error in parameters Note: only one of name or prefix must be given.

#### Conda.uninstallPackages

uninstallPackages(packages, name="", prefix="")

Public method to uninstall packages of a conda environment (including all no longer needed dependencies).

packages (list of str)
  list of package names to be uninstalled
name (str)
  name of the environment
prefix (str)
  prefix of the environment

Return:
  flag indicating success

Return Type:
  bool

Raises RuntimeError:
  raised to indicate an error in parameters Note: only one of name or prefix must be given.

#### Conda.updateAllPackages

updateAllPackages(name="", prefix="")

Public method to update all packages of a conda environment.

name (str)
  name of the environment
prefix (str)
  prefix of the environment

Return:
  flag indicating success

Return Type:
  bool

Raises RuntimeError:
  raised to indicate an error in parameters Note: only one of name or prefix must be given.

#### Conda.updateConda

updateConda()

Public method to update conda itself.

Return:
  flag indicating success

Return Type:
  bool

#### Conda.updatePackages

updatePackages(packages, name="", prefix="")

Public method to update packages of a conda environment.

packages (list of str)
  list of package names to be updated
name (str)
  name of the environment
prefix (str)
  prefix of the environment

Return:
  flag indicating success

Return Type:
  bool

Raises RuntimeError:
  raised to indicate an error in parameters Note: only one of name or prefix must be given.

#### Conda.writeDefaultConfiguration

writeDefaultConfiguration()

Public method to create a conda configuration with default values.

Up