Installing the Globus CLI
The Globus CLI is a Python-based application that must be installed on the computer systems at both ends of your file transfer. It requires a Python version of at least 3.6. All TACC resources meet that requirement, but on other computers you may need to install Python 3.6+ and pip (or Python 3.7+ and pipx) before installing the Globus CLI.
The Globus web site provides CLI installation instructions that cover all types of operating systems. It also includes instructions for updating and removing the CLI. This page follows the recommendations from the Globus site, while only giving instructions for installing on TACC resources and assuming that you are running the Bash shell. When installed, the CLI will be added to your shell path and will automatically be available when you log in again.
Installation Steps
Check the active version of Python on the computer using the python -V
or python3 -V
command.
On Linux systems, your "path" may select a Python executable of an insufficient version.
In that case, you will need to "load" a different version:
-
The
module avail python
command can tell you which Python versions exist on the computer. - The
module load
command can be used to load a different version from among those available.
The examples in this topic are based on version 3.5 of the Globus CLI,
so when you install the CLI, be sure you select a sufficiently new version.
The Globus CLI can be installed into a computer's system folders
with the command pip install globus-cli
.
However, on managed systems like TACC resources,
users cannot install software into the system folders.
On those systems the CLI must be installed into a folder in user-controlled disk space.
Below are two options for installing the Globus CLI in a user-space folder. The first option is simpler, but is only suitable for users who expect to use a single Python environment. The second option requires a bit more work, but prevents your Globus CLI installation from impacting other aspects of your Python installation.
Installation Option 1
If you only plan to use a single Python environment,
you can install the Globus CLI into your ~/.local/bin
folder
and add that location to your PATH environment variable:
$ pip3 install --user globus-cli
$ export PATH="$PATH:$HOME/.local/bin"
$ echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$HOME/.bashrc"
Installation Option 2
Users who prefer to isolate the Globus CLI installation from their other Python work
can do so by using a virtual Python environment.
The instructions below create a virtual environment using
the virtualenv
command.
First, use the command type virtualenv
to determine if an appropriate version of
virtualenv
is installed on your system.
If it is missing or if a Python 2 version is the first one found on your path,
the correct version can be installed in your ~/.local/bin
folder,
which should be added to your PATH environment variable:
$ type virtualenv
-bash: type: virtualenv: not found
$ pip3 -q install virtualenv --user
$ export PATH="$HOME/.local/bin:$PATH"
$ echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$HOME/.bashrc"
In this example, running virtualenv creates a virtual environment folder
named .globus-cli-virtualenv
in your home directory,
though you could choose a different location or folder name.
Issue these commands to create the virtual environment:
$ cd ~
$ virtualenv -q .globus-cli-virtualenv
Now you must activate the newly created virtual environment
and then install the Globus CLI in that environment.
Whenever this virtual environment is activate, its bin
folder
will be at the beginning of your shell's path and the Globus CLI command will be found.
$ source .globus-cli-virtualenv/bin/activate
$ pip3 -q install globus-cli
Testing the Installation
You can now issue the command globus --help
to confirm that the installation was successful.
When you want to stop using the Globus CLI you can issue the deactivate
command
to return your shell to its regular, non-virtual environment.