tableau / TabPy

Execute Python code on the fly and display results in Tableau visualizations:

Home Page:https://tableau.github.io/TabPy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not start TabPy in cmd

JuHolland opened this issue · comments

Environment information:

  • OS: Windows 10
  • Python 3.9
  • TabPy 2.5.0

Issue
I installed tabpy with the following command: python -m pip install tabpy
And then tried and start TabPy by running in the cmd: python -m tabpy

However I would get the following error:
No module named tabpy.__main__; 'tabpy' is a package and cannot be directly executed

Solution
The solution I found is to add a __main__.py script in C:\Users\name.surname\AppData\Local\Programs\Python\Python39\Lib\site-packages\tabpy\__main__.py
The script contains:

from tabpy.tabpy import main
import sys

sys.exit(main())

Did I maybe do something wrong when installing TabPy?

you don't need to be in Python to run the cmd to start TabPy. You should just be able to type tabpy in the cmd line without starting Python first.