Installation and setup

Install Neptune client for Python

Before you start, make sure that:
  • You have Python 3.6+ on your system,
  • You have pip or conda installed.

Install neptune-client

Depending on your operating system open a terminal or CMD and run this command:
pip
conda
1
pip install neptune-client
Copied!
1
conda install -c conda-forge neptune-client
Copied!

Install Neptune client for R

The Neptune integration with R is available as a CRAN package and a Github project.
Before you start
Make sure you meet the following prerequisites before starting:
  • Have Python 3.x installed
Even if you are using R you still need to have Python installed on your system. The easiest way to install a Python environment is with Conda. Go here to read the installation instructions.
Install the Neptune package
Install the package by running:
1
install.packages('neptune')
Copied!

Authentication (Neptune API token)

Get API token
  • Click on the User menu button (where your user Avatar is)
  • Click Get Your API token. This will open a modal window.
  • Copy your API token
You can also get your API token directly from here.
Set to the environment variable
Assign it to the bash environment variable NEPTUNE_API_TOKEN:
Linux
Windows
macOS
Notebook
1
export NEPTUNE_API_TOKEN='YOUR_LONG_API_TOKEN'
Copied!
1
set NEPTUNE_API_TOKEN="YOUR_LONG_API_TOKEN"
Copied!
1
export NEPTUNE_API_TOKEN='YOUR_LONG_API_TOKEN'
Copied!
1
from getpass import getpass
2
api_token = getpass('Enter your private Neptune API token: ')
Copied!
or append this line to your ~/.bashrc or ~/.bash_profile files (recommended).
You can also pass your Neptune API token to the api_token argument of neptune.init()
1
# Create run in project
2
run = neptune.init(api_token='<YOUR_API_TOKEN>')
Copied!
Always keep your API token secret - it is like a password to the application. Appending the “export NEPTUNE_API_TOKEN=’YOUR_LONG_API_TOKEN’” line to your ~/.bashrc or ~/.bash_profilefile is the recommended method to ensure it remains secret.

Setting the project name

To log Runs into a Project you need to know the full name of your Project. It has a format of:workspace_name/project_name.
To find your Project name:
  • go to your project in the Neptune UI
  • go to Settings > Properties
  • copy the full project name from there
Set to the environment variable
Assign it to the bash environment variable NEPTUNE_PROJECT:
Linux
Windows
macOS
1
export NEPTUNE_PROJECT='<YOUR_WORKSPACE/YOUR_PROJECT>'
Copied!
1
set NEPTUNE_PROJECT='<YOUR_WORKSPACE/YOUR_PROJECT>'
Copied!
1
export NEPTUNE_PROJECT='<YOUR_WORKSPACE/YOUR_PROJECT>'
Copied!
or append this line to your ~/.bashrc or ~/.bash_profile files (recommended).
You can also pass your project name to the project argument of neptune.init()
1
# Create run in project
2
run = neptune.init(project='my_workspace/my_project')
Copied!

Deploy Neptune on your own server (on-premises)

You can also deploy Neptune on your own infrastructure. If you are interested in that read: How to deploy Neptune on-prem

FAQ

ModuleNotFoundError: No module named ‘neptune’

When you get this error it means that you don't have Neptune client library installed on your system.
To install it, open a terminal or CMD, depending on your operating system, and run:
pip
conda
1
pip install neptune-client
Copied!
1
conda install -c conda-forge neptune-client
Copied!

What is next?

Last modified 1mo ago