Step 1: Install Python 3
Follow the instructions in this file to setup your device.
Begin with installing Python3. If you're using a Mac, the easiest way to do this is by using Homebrew. Homebrew is a package manager for macOS that makes it easy to install software that you need.
- Open Terminal. You can do this by searching
Terminalin Spotlight Search (Cmd+Space)
brew -v. If you see the following pop up, skip to Step 6:
Homebrew x.x.x. If you don't see this, continue to the next step.
- To install Homebrew, go to https://brew.sh/.
- Copy the first line under
Install Homebrew. Paste it into Terminal, and hit Enter.
- Enter your password when prompted and wait for Homebrew to finish installing.
brew install python3in Terminal to install Python 3.
- Once installation is complete, run
python --version. If you see
Python 3.x.x, you're all set! If instead you see
Python 2.x.x, run
python3 --version– you will need to use the command
python3to run Python3 from now on.
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt-get install python3.6 python3.6-dev
python3.6 -m pip install --upgrade pip`
Download and install the latest release from here: https://www.python.org/downloads/windows/
Step 2: Install the Cognite Python SDK
Now that you have Python 3 installed you can install the Cognite Python SDK. To do this type
pip install cognite-sdk. You may need to use
pip3 install cognite-sdk if you installed
python3 with homebrew.
You can find the documentation for the SDK here.
Step 3: Generate API Key
To access the Cognite Data Platform you must get an API key. API keys will differ by project.
For now, let's obtain the API key for the publicdata project that is the basis of the first Jupyter tutorial.
To do this go to openindustrialdata.com. Click Access Platform and fill out the registration form. Once you're redirected to your page you can click Generate your API key. You should copy and store this key somewhere safe (such as LastPass).
Now, to run the the notebook go to Terminal and again navigate to the directory where the README file is. To run the Jupyter notebook with the relevant API Key, enter
COGNITE_API_KEY=<your key here> jupyter notebook.
Software Development Kit
To make your experience working with the Cognite Data Platform easier, we offer several software development kits, or SDKs: