Install the Command Line Interface

How to install the Paperspace CLI


The Paperspace CLI is available on pypi and anaconda and works on Windows, MacOS, and Linux.

The CLI requires Python 2.7 or Python 3.4+. Be sure to use a compatible version of pip depending on your Python version.

ProTip! We recommend installing and using the CLI within a Python virtual environment. This will minimize conflicts with existing libraries on your computer. We recommend virtualenv.

Python 2.7 Install virtualenv:

pip install virtualenv

Create new virtualenv:

virtualenv <env_directory_path>

Activate virtualenv:

source <env_directory_path>/bin/activate

Python 3.4+ Create new virtualenv:

python3 -m venv /path/to/new/virtual/environment

Activate virtualenv:

source /path/to/new/virtual/environment/bin/activate

Install the CLI

Using pip to install the latest stable release

pip install -U paperspace

Using conda to install the latest stable release

conda install -c paperspace paperspace

Using pip to install the latest prerelease

pip install -U --pre paperspace

Note: Although the CLI package is called "paperspace", currently you run it locally using the command paperspace-python, which is installed as part of the package.

Connecting your account

You can either stash your API key on your computer or include your API key on each command.

Set your active API key

paperspace-python apiKey XXXXXXXXXXXXXXXXXXX

Alternative: Include your API key for each command

paperspace-python experiments createAndStart ... --apiKey XXXXXXXXXXXXXXXXXXX

Obtaining an API key

First, sign in to your Paperspace account. On the left of your home console, you should find an 'API' section. There, you'll find a form where you can create API keys. You'll use the API keys you generate here to authenticate your requests.

API keys section of the console (