Getting Started
Installing and setting up the Datapane library and API on your device

Installation

Datapane's Python library and CLI can be installed using either conda or pip on macOS, Windows, or Linux. Datapane supports Python 3.6 - 3.9.
Instructions for installing Python can be found at https://wiki.python.org/moin/BeginnersGuide/Download.

conda

If you use conda, you can install it with:
Bash
Jupyter
1
$ conda install -c conda-forge "datapane>=0.10.0"
2
$ datapane hello-world
Copied!
1
!conda install -c conda-forge "datapane>=0.10.0"
2
!datapane hello-world
Copied!
Conda sometimes installs an older version of datapane. If you receive errors, please check the version and try running conda update --all or try in a new conda environment (conda create -n ENV and conda activate ENV)

pip

If you use pip, you can install it with:
Bash
Jupyter
1
$ pip3 install -U datapane
2
$ datapane hello-world
Copied!
1
!pip3 install -U datapane
2
!datapane hello-world
Copied!

Upgrading

We upgrade datapane regularly to include new features, both in the client and on the hosted version. From time to time your client may no longer be compatible with the datapane server when uploading a report. If this happens, you will receive an error like the following:
1
IncompatibleVersionError: Your client is out-of-date (version 0.9.2) and may be causing errors, "
2
please upgrade to version 0.10.2
Copied!
In such an event, please upgrade your datapane cli via pip or conda and try again.
Upgrading via pip
If you installed datapane via pip, run the following command:
1
$ pip install -U datapane
Copied!
Upgrading via conda
If you installed datapane via conda, run the following command, adding the --all flag if needed. As above, if you receive errors please try using a fresh conda environment.
1
$ conda update datapane OR conda update --all
Copied!

Windows Tips and Troubleshooting

Having problems running on Windows? Please read on...
We generally recommend installing via conda over pip on Windows as it's easier to install all the required dependencies.
If you need to install Python first, the latest versions of Windows 10 can install Python for you automatically - running python from the command-prompt will take you to the Windows Store where you can download an official version. We also strongly recommend using a 64-bit rather than the 32-bit version of Python, you can check this by running the command python -c "import struct; print(struct.calcsize('P')*8, 'bit')" from the Command Prompt.
1
$ python -c "import struct; print(struct.calcsize('P')*8, 'bit')"
Copied!
Also note that on Windows, you can run the datapane command either by running datapane or datapane.exe on the command-line.
Some specific issues you may encounter on Windows include:

Import errors when running/importing datapane

You may encounter errors such as ImportError: DLL load failed when running datapane or importing it within your Python code.
If so, try installing the Visual C++ Redistributables for Windows from Microsoft and running again (you most likely want to download the version for x64, i.e. vc_redist.x64.exe)

Datapane install errors trying to compile pyarrow using Visual C++

This usually occurs when you are running a 32-bit version of Python and installing via pip. Either try using conda or install a 64-bit version of Python (for example from the Windows Store as mentioned above).
This may also occur when using Windows 7 - we only support directly Windows 10, however, it may be worth trying to install via conda instead, if you are stuck on Windows 7.

'datapane.exe' is not recognized as an internal or external command

This occurs when your Windows %PATH% doesn't include all the Python directories, specifically the Scripts directory.
You may notice during the datapane install messages such as (or similar to):
1
The script datapane.exe is installed in 'C:\users\<USERNAME>\appdata\local\programs\python\python37\Scripts' which is not on PATH.
2
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Copied!
To fix this, adjust your %PATH% to include your specific Scripts path as mentioned in the pip warning (see https://datatofish.com/add-python-to-windows-path/ for more detailed instructions). Alternatively, you can try running the datapane client directly, using the command python3.exe -m datapane.client instead.
If you are still having problems installing, please ask on the Datapane Forum, and someone will come to help you.

Authentication

Datapane has a server component which you can access through the CLI and Python library and requires an authentication token. You can authenticate through either the CLI or the Python library, and all future requests will automatically be authenticated.

Datapane Studio

Datapane Studio is hosted on datapane.com and is available as a free server where you can upload reports. The API and CLI are configured to use this server by default. You can sign up for a free account via our website or via CLI:
1
$ datapane signup
Copied!
After this, you'll see a code snippet with datapane login and your token. Login by running this code snippet or Python library using this key. All future requests from both the CLI and Python library will automatically be authenticated. Reports are unlisted by default, and you can share them publicly or privately (see Uploading and Sharing).
If you need your API key in the future, you can find it in your settings page.
Python Library
CLI
1
import datapane as dp
2
dp.login(token=your_token)
Copied!
1
$ datapane login
Copied!

Datapane Teams

Datapane Teams provides private hosted servers and supports on-premise instances for organizations. In such a case, log in to your instance, for instance https://your-company.datapane.net , using the credentials provided to you by your admin.
Similar to when using the free Datapane instance, your home page will indicate your API key and you will be able to authenticate by passing in your API key to the login command. You will need to pass in the full URL of your server (including the https://) to the login command as follows.
CLI
Python Library
1
$ datapane login --server=https://[your-server].datapane.net
2
Enter your API Key: [paste your API key here]
Copied!
1
import datapane as dp
2
dp.login(token=your_token, server='https://[your-server].datapane.net')
Copied!
The CLI supports multiple profiles using the --env flag, so you can easily work with both the default Datapane instance and your private enterprise instance at the same time
1
$ datapane --env default login
2
$ datapane --env acme login --server=https://acme.datapane.net
Copied!

Check your Authentication

To check you have access and which account you are logged in as, run:
CLI
Python
1
$ datapane ping
Copied!
1
import datapane as dp
2
dp.ping()
Copied!
Last modified 1mo ago