While runnning a python file in my pod, I encounter a ModuleNotFound Error for tkinter
I have installed tkinter using pip and through
apt-get install python3-tk
. Still getting the error. I don't care about the gui as much as I care that my application completes (the application results are independent of gui tools). What can I do?24 Replies
Would need to know more details
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Thanks for the reply folks, I cant find gpus for my pod yet, let me create the issue and send the exact error logs and the steps I followed to run it.
In the meantime, what details should I include?
I am planning show the list of packages I installed, the order of installation, and the name of my pod's template. Also the error log, obviously. Anything else which would help you?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Error message -

dependencies installed (through pip)-
name: MonoGS
channels:
- pytorch
- conda-forge
- defaults
dependencies:
# - cudatoolkit=11.6
- plyfile==0.8.1
- python==3.7.13
- pip==22.3.1
# - pytorch=1.12.1
# - torchaudio=0.12.1
# - torchvision=0.13.1
- tqdm
- pyyaml
- pip:
- submodules/simple-knn/
- submodules/diff-gaussian-rasterization/
- opencv-python==4.8.1.78
- munch
- trimesh
- evo==1.11.0
- open3d==0.17.0
- torchmetrics
- imgviz
- PyOpenGL==3.1.1a1
- glfw
- PyGLM
- wandb
- lpips
- rich
- ruff
I also installed tkinter explicitly
apt-get install python-tk
pip install tk
Template used -
RunPod Pytorch 1.13.1
runpod/pytorch:1.13.0-py3.10-cuda11.7.1-devel-ubuntu22.04
RTX A4500
Should I comment out the plt.figure() line?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Hi, no I wrote a script to pip install all the dependencies, instead of installing them through a venv (the file is built for anaconda)
cool I will try that. Can we not plot any figures in general in a pod? Like, even if I try, will it always give an error? Or can I simply skip the plotting and run the rest of my code
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
I ran the command
python -m tkinter
. I got this error /usr/bin/python: No module named tkinter
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Python 3.8.19
Same
/usr/bin/python: No module named Tkinter
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Ok, it will install in all probability, but I will have to run my program to check if it fails. Let me get back in 2 mins
Yes, it installed correctly
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Hi, this seems to have changed the error message, but the import error still persists
Can we actually see any guis using the pods? Or is it purely a command line interface?
I think comment out the line plt.figure() shown in this error log helped. I dont see an error, and hopefully my training goes through
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
oh can you recommend what software will allow this? I am using vscode, and connecting using a regular ssh command. Does it need anything specific?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Oh
Still nothing
I edited
tkinter
and Tkinter
in place of module, but got the same error
Can you help me with this?Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Ok Cool, will do! For now I have generated all the GUI figures and plots, I'll try to view them locally on my system. I'll definitely look it up. Thanks for your help!
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View