Skip to main content
Chemistry LibreTexts

6: Conda Package Management System

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)


    Conda is a cross platform package management system. It allows you to install, update and manage software packages and dependencies. Conda makes it easy to update Python and ohter packages.  There are two ways to run Conda, through the command line, or through the Anaconda-Navigator GUI. There are three advantages to installing Conda and you should install a package management system like Conda if you intend to tackle data science projects..

    1. Package Management: Conda allows you to install, update and manage packages for multiple programming languages like Python.  Some packages you may be interested in are Scikit learn (Machine Learning package), Matplotlib....
    2. Environment Management: Allows you to create isolated environements with specific packages and dependencies (some package may require different versions of Python).
    3. Cross-Platform Support: 




    There are two distributions of Conda; Anaconda and Miniconda. Anaconda comes with a large number of preinstalled packages and the Anaconda Navigator, which is a GUI that allows you to manage your packages.  Miniconda is a bare bones installation of Conda that only includes a few essential packages.  You should install Anaconda if you are interested in Data Science and have lots of free space on your computer.  We will provide a tutorial on using Miniconda and only install packages we need.


    Miniconda installs Conda, Python and a few other useful packages like pip, and zlib.  To install additional packages you will need to use the conda install command.  In this activity we will install miniconda and show you how to make the Python version in miniconda the default interpreter in Thonny. It will then be easy to update Python by using Conda. 

    Go to the following URL and choose the Miniconda Installer Links for your operating system and download the executable file.

    The following images are screen shots for installing Miniconda that date to 2022, and may have changed since them.

    clipboard_ee2fc8cb0f14ceb99f5863804119941bb.pngFigure \(\PageIndex{8}\):Screen captures of steps involved with installing miniconda. (Copyright; Bob Belford, CC 0.0)

    Once you install Miniconda you want to open the Anaconda prompt (miniconda 3) from your Windows start menu, which can be done by typing in the search: Anaconda


    Figure \(\PageIndex{9}\): Opening the Anaconda command prompt for miniconda in Windows 10. (Copyright; Belford CCC 0.0)

    If you are using a Windows machine the command prompts are different than Linuxges you want to type the following into the command prompt.  You first need to navigate to the correct folder.  In the command prompt (which is a terminal shell) type ls to see your folders.

    Note <ctrl> C bring back the command prompt if you get stuck

    #you may need to use if on windows
    clipboard_eac827ec8e21bbc16d0911c38a824c7f0.pngFigure \(\PageIndex{10}\): Viewing directory to locate where conda is installed. (Copyright; author via source)

    Now move to that directory (Change Directory) 

     cd .\miniconda3\

    When you list the files you will see where you installed python

    You will also want to update python

    conda update python
    clipboard_e06e2050f11ae882be4eb8f137b8c6041.pngFigure \(\PageIndex{11}\): Screen shot showing how to update python with miniconda. (Copyright; Belford CC 0.0)

    Exit the anaconda shell


    Changing Default Thonny Python Interpreter

    Now we want to link our Thonny to the new install of python.  Open Thonny and go to tools/options/interpreter (figure \(\PageIndex{12}\)) and choose the "Alternative Python 3 interpreter or virtual environment".  Initially the python executable will direct to where you installed Thonny and you need to direct it to the new path, which you found above.  Or you can click the three dots tothe right of the current path and navigate to where the python application file is located and open it.



    Figure \(\PageIndex{12}\): Copy and Paste Caption here. (Copyright; author via source)

    If you now look at the shell in Thonny you can see the new updated Python program you are running

    clipboard_eb8ed9de4cf7d088c59fde54123fb9b69.pngFigure \(\PageIndex{13}\): the version and path of the Python Interpreter Thonny is using. (Copyright; Belford CC 0.0)



    Anaconda is a data science platform which allows you to find and install over 7,500 data science and machine learning package and progarams like Python, R, Jupyter, Scikit learn, matplotlib and R, but also includes the conda package manager that helps deal with conflicts across software.  There are two installation options, Anaconda and Miniconda. If you are planning to get involved with Data Sciences or have a high quality computer you will probably want to install the full version of Anaconda, but if this class is your only endeavor than you will probably want to install the Miniconda version.  Note, the full version comes with the Anaconda Navigator that makes it very easy to launch and maintain packages, where the Miniconda requires you to use to launch programs through the conda prompt.  What we are going to do in this class is connect the Thonny IDE to the Python interpreter installed with either Anaconda or Miniconda and use Thonny to launch Python.  We are choosing Thonny because it comes installed with the Raspberry Pi. We will also be using MS Visual Studio Code as it integrates with Git and GitHub versioning software

    • Anaconda
        • Well suited for scientific programmings.  Comes with ipython and Spyder, and the Conda package management system.
        • Has 1500 scientific packages and uses 3GB of disk space


    Anaconda Navigator

    In your user directory type

    conda install anaconda-navigator



    6: Conda Package Management System is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?