I am getting "module not found : no module named 'tableau server client'" in my python script

120 Views Asked by At

I am creating virtual environment & using that in my script.

my library site packages located at:

"/c/sparrow/acnt/rh-python38/root/local/lib/python3.8/site-pack/

my virtual env script: Location with name: /c/sparrow/acnt/vir_env.sh

python_path=/c/sparrow/acnt/rh-python38/root/usr/bin/python
${python_path} -m venv /c/sparrow/emp/.rmp_rp
source /c/sparrow/emp/.rmp_rp
python_path= /c/sparrow/emp/.rmp_rp

here the path I have checked "/c/sparrow/acnt/rh-python38/root/usr/bin/" a) python is symbolic link points to ./python3 b) python3 is a symbolic link points to python3.8

my shell script: location with name: /c/sparrow/acnt/trigger.sh

/c/sparrow/acnt/vir_env.sh

python_path=/c/sparrow/acnt/rh-python38/root/usr/bin/python
source /c/sparrow/emp/.rmp_rp/bin/activate
python_path= /c/sparrow/emp/.rmp_rp/bin/python

${python_path}/c/sparrow/acnt/test.py

my python script: location with name: /c/sparrow/acnt/test.py

import tableauserverclient

print("hello")

I explained above what I tried. But I am getting module not found error even after libraries are there.

I think error might be in virtual environment.

Please help on this

1

There are 1 best solutions below

2
mnk-reddy On

Module Not found error basically most of the time means one of the two:

  1. You don't have that module

    pip3 install tableauserverclient

  2. Make sure you have this module installed within your virtual env (If you are using one)