Install the Conda Python package manager
As we learned in the Installing GCPy chapter, there are multiple installation methods for GCPy. Some of these installation methods use the Conda package manager. If Conda has not been already installed on your system, you can install it following the instructions in this chapter. not already present on your system.
Important
Previous versions of this documentation encouraged users to install the Mamba package mamager. However, Mamba has been deprecated as of August 2024 and is slated for removal as a stand-alone package. Mamba functionality has since been incorporated into Conda version 2.24 and later.
We have updated these installation instructions accordingly, and now direct users to install Conda via the Miniforge distribution.
Check if Conda is already installed
To check if a version of Conda has already been installed on your system, type:
$ conda --version
If a Conda version exists, you will see its version number printed to the screen:
conda version A.B.C
If a Conda version exists, you may skip ahead to the Methods for installing GCPy section. If not, then proceed as described below.
Install the Miniforge distribution
We recommend installing Conda from the Miniforge distribution.
Download the Miniforge installer script with the wget download utility:
$ wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
Your shell will run the uname command to fill in your OS type and processor type automatically.
Execute the Miniforge installer script.
$ bash Miniforge3-$(uname)-$(uname -m).sh
Review and accept the license agreement.
In order to continue the installation process, please review the license agreement. Please, press ENTER to continue >>>
Press
ENTERand thenSPACEuntil you reach the end of the license agreement. Then you will be asked:Do you accept the license terms? [yes|no] [no] >>>
Type
yesand hitENTER.
Specify the root installation path:
Miniforge3 will now be installed into this location: /home/YOUR-USER-NAME/miniforge3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/home/YOUR-USER-NAME/miniforge3] >>>
In most cases, it should be OK to accept the default installation location. But on some systems, users may be encouraged to install software into a different location (e.g. if there is a faster filesystem available than the home directory filesystem). Consult your sysadmin or IT staff if you are unsure where to install Miniforge.
Press the
ENTERkey to accept the default installation path or type a new path and then pressENTER.Miniforge will downlad and install Python software packages into the
pkgssubfolder of the root installation path. Similarly, when you create Python environments, these will be installed to theenvssubfolder of the root installation path.You may see this warning:
WARNING: You currently have a PYTHONPATH environment variable set. This may cause unexpected behavior when running the Python interpreter in Miniforge3. For best results, please verify that your PYTHONPATH only points to directories of packages that are compatible with the Python interpreter in Miniforge3: /path/to/miniforge3
As long as your
PYTHONPATHenvironment variable only contains the path to the root-level GCPy folder, you may safely ignore this. (More onPYTHONPATHlater.)
Tell the installer to initialize Miniforge:
Do you wish the installer to initialize Miniforge by running conda init? [yes|no] [no] >>>
Type
yesand thenENTER. The installer script will add some code to your~/.bashrcsystem startup file that will tell your shell where to find Python environments.
Exit your current terminal session. Start a new terminal session to apply the updates. You are now ready to install GCPy.