The purpose of the conda package manager is to maintain a Python environment.
The base Python Environment
In Anaconda the base Python environment is a Python distribution and should not be modified outwith the standard conda images available from Anaconda covered in the Updating Anaconda tutorial. The reason for this is the Python distribution has a large number of packages and changing a package that is a dependency for the other packages will normally result in a number of these packages being removed leading to an unstable Python environment.
To recap the base Python environment is found in:
%USERPROFILE%\Anaconda3
This contains a python.exe which is the base Python environment:

This base Python environment also has a Lib folder which contains the Python standard modules:

Such as email (as a subfolder):

datetime (as a module):

And the site-packages folder which contains the third-party libraries:

such as numpy, pandas and matplotlib:

The envs folder
Additional Python environments are found in the environments folder envs:
%USERPROFILE%\Anaconda3\envs

By default there are no additional Python environments and this folder is empty:

A Python environment is essentially a sub-installation of Python which is used to install Python alongside a number of third-party Python libraries.
The use of Python environments for example allows installation of the latest version of each IDE without breaking the functionality of the (base) Python environment.
conda Package Manager
Overview
An overview about the conda package manager can be seen by opening up the Anaconda PowerShell Prompt and inputting the PowerShell command:
conda

This gives the following output:

command | description |
---|---|
clean | Remove unused packages and caches. |
compare | Compare packages between conda environments. |
config | Modify configuration values in .condarc. |
create | Create a new conda environment from a list of specified packages. |
doctor | Display a health report for your environment. |
info | Display information about current conda install. |
init | Initialize conda for shell interaction. |
install | Install a list of packages into a specified conda environment. |
list | List installed packages in a conda environment. |
notices | Retrieve latest channel notifications. |
package | Create low-level conda packages. |
remove | Remove a list of packages from a specified conda environment. |
rename | Rename an existing environment. |
run | Run an executable in a conda environment. |
search | Search for packages and display associated information using the MatchSpec format. |
update | Update conda packages to the latest compatible version. |
build | See conda build –help. |
content-trust | See conda content-trust –help. |
convert | See conda convert –help. |
debug | See conda debug –help. |
develop | See conda develop –help. |
env | See conda env –help. |
index | See conda index –help. |
inspect | See conda inspect –help. |
metapackage | See conda metapackage –help. |
pack | See conda pack –help. |
render | See conda render –help. |
repo | See conda repo –help. |
server | See conda server –help. |
skeleton | See conda skeleton –help. |
token | See conda token –help. |
verify | See conda verify –help. |
Conda Channels
There are two main channels used by the conda package manager:
channel name | channel description |
---|---|
conda-forge | community channel maintained by developers |
anaconda | channel maintained by the Anaconda company |
The community channel is maintained directly by Python developers. A subset of the packages from the community channel are further tested by the Anaconda company for use in the Anaconda Python distribution.
Therefore popular packages in the community channel are usually more up to date with respect to packages in the conda channel. And less popular packages in the community channel are unlikely to be in the anaconda channel.
A Python environment is normally unstable if it uses mixed channels and most custom end-user Python environments will only use packages in the conda-forge channel.
Config and .condarc file
The conda config command is used to create a .condarc file which can be used to change the solver used by the conda package manager and the channel and channel priority used by the conda package manager.
Open the Anaconda PowerShell Prompt. Recall the default location the Anaconda PowerShell Prompt opens in is %USERPROFILE%. This is the location a .condarc file gets placed:

If an old .condarc file is present delete it using:
del .condarc


The conda package manager uses the legacy solver by default. The newer solver libmamba should be used instead:
conda config --set solver libmamba
The community conda-forge should be added:
conda config --add channels conda-forge
And the anaconda channel (defaults) can be removed:
conda config --remove channels defaults
Additional performance can be achieved by setting the channel priority to strict:
conda config --set channel_priority strict

This .condarc is optimised for creating new Python environments using packages from the community channel conda-forge. It should not be used to update Anaconda; which should only use the anaconda package from the anaconda channel.

The .condarc looks like the following when opened in a text editor:

solver: libmamba channels: - conda-forge - defaults channel_priority: strict
Close the Anaconda PowerShell Prompt to refresh changes made by the .condarc.
Create
A Python environment can be created using the syntax:
conda create -n notbase
where "notbase" is the environment name. Input y
to proceed:

Notice in envs, the notbase subfolder is created:

Activate
Once the Python environment is created it can be activated (selected) using:
conda activate notbase

Once activated, any changes made using the conda package manager in the Anaconda PowerShell Prompt will apply to this Python environment instead of base. The prompt now has the (notbase) prefix indicates the (notbase) Python is selected:

If the Anaconda PowerShell Prompt is closed and reopened, the default Python environment base will be selected. The Python environment notbase will have to be activated.
The conda activate comand does not change Python environment in the Windows Terminal because the WIndwos Terminal always uses the Python environment listed in the Windows Environmental Variables path.
Search
The conda-forge community channel can be searched for a package in this case the package "python" using:
conda search -c conda-forge python

Notice each Python has a version, a build number and a channel:

Specifying the channel is not necessary as the .condarc file already specifies use of the conda-forge channel however it is good practice to specify the channel. The package ipython can be searched for using:
conda search -c conda-forge ipython


Install
Multiple packages can be installed using the syntax:
conda install -c conda-forge python ipython

Details about the packages to be installed are listed:

Input y
in order to proceed:


Notice the Python environment notbase, now has its own python.exe:

Its own Lib subfolder:

This has the standard modules such as email (which is a multi-file module in a folder):

datetime which is a single module:

Third party libraries are in the site-packages subfolder:

This has ipython and some of its dependencies such as the matplotlib backend matplotlib_inline:

The data science libraries numpy, pandas and matplotlib (the full library) as they are not installed as they are not dependencies.
Remove
The command remove can be used to remove an installed package:
conda remove python ipython

If other packages rely on the packages being removed as dependencies, they will be removed. Since Python itself is being removed, and all packages are in turn dependent on Python, they will all be removed:


Input y
to proceed with the changes. The changes will then be made:

Notice the python.exe is gone alongside the Lib subfolder.
Install Specific Package Version
During installation version numbers can be specified:
conda install -c conda-forge python=X.Y.Z
Where X is the major number, Y is the minor version number and Z is the patch number. For example:
conda install -c conda-forge python=3.11.3
In the previous output when conda search was used. Each Python version 3.11.1 onwards had a build number of h628c8c_0. This can also be speciifed during installation:
conda install -c conda-forge python=3.11.3=h2628c8c_0_cpython
Some packages for example ipython have multiple variants that have the same version number, for example ipython has 3 variants that are at version 8.14.0 on the conda-forge channel. These each have unique build numbers pyh08f2357_0, py41d4057_0 and pyhd1c38e8_0 as seen in the previous output when conda search was used. Normally this is because there is a slightly seperate variant for different minor Python versions e.g. Python 3.11, 3.10 and 3.9.
A specific version of python and ipython can be installed:
conda install -c conda-forge python=3.11.3=h2628c8c_0_cpython ipython=8.14.0=pyh08f2357_0

Details about the other packages installed will display. Input y
in order to install the packages:

The changes will be made:

Update
A package can be updated to the latest version using:
conda update -c conda-forge python

Since an older version of Python was installed, the newer version 3.11.4 is available. To install it input y
:

Alternatively all packages in the environment can be updated using:
conda update -c conda-forge --all

Note sometimes some packages may be downgraded in order to upgrade some other packages. Sometimes packages require an older version of another package as a dependency. To install the updates input y
:

The updates are now installed:

List
Packages can be listed in the Python environment using:
conda list

The conda list command can be used with the option –revisions:
conda list --revision

Install Revision
The conda install command can be used with the option –revisions and assigned to a revision number. For example, the revision 3 before the update can be reverted to using:
conda install -c conda-forge --revision=3

Details about the changes will be provided including the downgrades:

Input y
in order to proceed and the proposed downgrade will be implemented:

Env Export
The currently activated Python environment can also be exported to a yet another markdown language yml file:
conda env export > Documents\notbase.yml

This creates a notbase.yml file in Documents:

This can be opened in notepad:

This is a very small file which can be shared on GitHub or emailed.
Env Create
An environment can be created from a yml file for example the notbase.yml in the Documents folder using:
conda env create -n notbase2 -f Documents\notbase.yml
Note this is done with the base Python environment activated.

The environment is created and can later be activated:

The name of the new environment notbase2 displays as a subfolder in envs:

Env Remove
An environment can be removed using the command:
conda env remove -n notbase
Note this is done with the base Python environment activated as a Python environment cannot be removed if it is activated:

The operation will proceed:

The folder notbase will be removed in envs:

rename
A Python environment can be renamed by using the command:
conda rename -n notbase2 notbase
notbase2 is the original name and notbase is the new name. Note this is done with the base Python environment activated as a Python environment cannot be renamed if it is activated:

The notbase folder in the envs folder is now renamed notbase2:

Env List
To list Python environments use:
conda env list

Clean
A backup of all previously downloaded versions is available which can occupy a large amount of disk space. These can be cleaned using:
conda clean --all

Python Environments for IDEs
Previously the commands create and install were used seperately and when the list of revision was examined revision 0 had no packages. The conda create command can be used to list a series of packages to be installed when creating a Python Environment. This command will be used to create a Python Environment suitable for the latest version of each Python IDE discussed.
IDLE Python Environment
conda create -n idle -c conda-forge python cython seaborn scikit-learn sympy openpyxl xlrd xlsxwriter lxml sqlalchemy tabulate
Installing seaborn will install numpy, pandas and matplotlib as these are dependencies for seaborn.
openpyxl, xlrd, xlsxwriter, lxml, sqlalchemy and tabulate are file format convertors used for pandas.
IDLE should be launched from its own Python environment using the Anaconda PowerShell Prompt.
Thonny Python Environment
conda create -n thonny -c conda-forge python cython seaborn scikit-learn sympy openpyxl xlrd xlsxwriter lxml sqlalchemy tabulate
Installing seaborn will install numpy, pandas and matplotlib as these are dependencies for seaborn.
openpyxl, xlrd, xlsxwriter, lxml, sqlalchemy and tabulate are file format convertors used for pandas.
The Python interpretter needs to be selected in Thonny.
Spyder Python Environment
conda create -n spyder -c conda-forge python spyder cython seaborn scikit-learn sympy openpyxl xlrd xlsxwriter lxml sqlalchemy tabulate pyqt
Installing seaborn will install numpy, pandas and matplotlib as these are dependencies for seaborn.
openpyxl, xlrd, xlsxwriter, lxml, sqlalchemy and tabulate are file format convertors used for pandas.
pyqt is required for an interactive matplotlib plotting backend.
Spyder should be launched from its own Python environment using the Anaconda PowerShell Prompt or its own Start Menu Shortcut.
JupyterLab Python Environment
conda create -n jupyterlab -c conda-forge python jupyterlab cython seaborn scikit-learn sympy openpyxl xlrd xlsxwriter lxml sqlalchemy tabulate nodejs ipywidgets plotly jupyterlab-variableinspector ipympl pyqt
Installing seaborn will install numpy, pandas and matplotlib as these are dependencies for seaborn.
openpyxl, xlrd, xlsxwriter, lxml, sqlalchemy and tabulate are file format convertors used for pandas.
nodejs allows installaiton of JupyterLab extensions.ipywidgets and plotly can be used to create widgets and plots using Python code, under the hood JavaScript is used to display these in the browser. The variableinspector gives a variable inspector, similar in functionality to variables in Thonny.
pyqt and ipympl are required for an interactive matplotlib plotting backends.
JupyterLab should be launched from its own Python environment using the Anaconda PowerShell Prompt.
VSCode Python Environment
conda create -n vscode -c conda-forge python notebook cython seaborn scikit-learn sympy openpyxl xlrd xlsxwriter lxml sqlalchemy tabulate nodejs ipywidgets plotly ipympl pyqt
Installing seaborn will install numpy, pandas and matplotlib as these are dependencies for seaborn.
openpyxl, xlrd, xlsxwriter, lxml, sqlalchemy and tabulate are file format convertors used for pandas.
nodejs allows installation of JupyterLab extensions.ipywidgets and plotly can be used to create widgets and plots using Python code, under the hood JavaScript is used to display these in VSCode which behaves like a browser.
pyqt and ipympl are required for an interactive matplotlib plotting backends.
The Python interpretter needs to be selected in VSCode.
PyCharm Python Environment
conda create -n pycharm -c conda-forge python cython seaborn scikit-learn sympy openpyxl xlrd xlsxwriter lxml sqlalchemy tabulate pyqt
Installing seaborn will install numpy, pandas and matplotlib as these are dependencies for seaborn.
openpyxl, xlrd, xlsxwriter, lxml, sqlalchemy and tabulate are file format convertors used for pandas.
pyqt is required for an interactive matplotlib plotting backends.
The Python interpretter needs to be selected in PyCharm.
R Programming Language
While Anaconda is mainly associated with Python. The programming language R can also be installed using Anaconda:
JupyterLab
Recall that Jupyter is a loose acronym for Julia Python and R. To install R activate the jupyterlab Python environment created above using:
conda activate jupyterlab
And install r-irkernel from conda-forge using:
conda install -c conda-forge r-irkernel r-tidyverse r-ggthemes r-palmerpenguins
This will set it up for use with R. An R option will display under Notebook and Console allowing the R programming language to be ran in an interactive notebook or console instead of Python.
RStudio
Currently only legacy versions of rstudio are available on the r, conda-forge and anaconda channels. It is generally better to install rstudio externally outwith Anaconda to get the latest version.