#While runnning a python file in my pod, I encounter a ModuleNotFound Error for tkinter

1 messages · Page 1 of 1 (latest)

winged hill
#

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?

bronze valley
#

Would need to know more details

balmy ruin
winged hill
#

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?

balmy ruin
#

What's the error

#

What command did you run

#

Lastly what do you expect

winged hill
#

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?

balmy ruin
# winged hill

Maybe you're using venv, and forgot to activate it before installing pip package

balmy ruin
#

nvm

winged hill
#

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)

winged hill
# balmy ruin sure if thats okay

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

balmy ruin
#

Running python -m tkinter from the command line should open a window demonstrating a simple Tk interface, letting you know that tkinter is properly installed on your system, and also showing what version of Tcl/Tk is installed, so you can read the Tcl/Tk documentation specific to that version.

#

no need to install it. It is usually preinstalled by default. Make sure you
write tkinter correctly** (with capital letter T on versions less than python 3)**
while importing

#

Wait what python version are you using?

winged hill
balmy ruin
#

python -m Tkinter

#

try that

winged hill
winged hill
balmy ruin
#

sudo apt-get install python3.8-tk

#

try

winged hill
#

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

balmy ruin
#

Hmm? what do you mean

#

python -m pip install module

or if it doesnt works try

winged hill
#

Can we actually see any guis using the pods? Or is it purely a command line interface?

winged hill
# winged hill

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

balmy ruin
balmy ruin
winged hill
winged hill
balmy ruin
#

No i don't, search it up

winged hill
#

Oh

#

Still nothing

winged hill
balmy ruin
#

Hmm try searching your problem up on Google, I can't seem to find the solution yet hahah

#

What is ur gui for?

balmy ruin
#

Try searching on explore page on runpod

winged hill
#

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!