How to Setup TabPy in Tableau to Supercharge Your Data Analysis

Have you ever thought about what you do in Tableau if you were able to integrate powerful Python scripts into your analysis? That’s where TabPy comes into play. TabPy (the Tableau Python Server) is an Analytics Extension implementation that expands Tableau’s capabilities by allowing users to execute Python scripts and saved functions via Tableau’s table calculations.

With TabPy set up in Tableau, users can perform machine learning analytics such as regression analysis, clustering, natural language processing (NLP), time series analysis, etc.

In this blog, we’ll walk you through how to set up TabPy in Tableau Desktop:

Step 1: Download Anaconda or a similar alternative. You can download Anaconda for free at https://www.anaconda.com/download

Step 2: Install Python on your machine (or server). You can visit https://www.python.org/downloads/ to download the most latest version or you can download Python through Anaconda

Step 3: From the Anaconda Navigator, launch the command prompt

Step 4: Next we’ll create a virtual environment. Type the following to create and name your virtual environment:

conda create --name TabPySetUp

Step 5: Now we’ll install and update Pip:

python -m pip install --upgrade pip

Step 6: Now that Pip is installed, we can easily install TabPy. All we need to do is type the following:

pip install tabpy

Great! Now you have TabPy!

Step 7: To run the TabPy server, all you have to do is type:

tabpy

Step 8: Then go to Tableau Desktop > Help > Settings and Performance > Manage Analytics Extension Connection

Step 9: The window below will appear. For Hostname put “localhost” and for Port put “9004”

Step 10: From here you can click to test your connection to the TabPy server and click save

Congrats! You’re now connected to the TabPy server and can now execute Python scripts and saved functions via Tableau’s table calculations.

Author:
Erin Potter
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab