0

I've been searching for it but could not find anything on the net on this topic.

When I'm working on a programm in python 3.5 which imports tkinter or pyglet I'm perfectly able to start it from the command line on my Linux Mint installation. As soon as I try to start it from pycharm or Visual Studio Code I get an error.

It is for tkinter:

Traceback (most recent call last):  File "/home/b...", line 3, in <module>
    import tkinter as tk
  File "/usr/lib/python3.5/tkinter/__init__.py", line 35, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named '_tkinter'

Both, the tkinter and the pyglet script, are working when they are started from idle3 (with F5).

Can anyone help me out?

Best

B.

3

1 Answer 1

1

i'm having the same issue. The problem lie with Linux Mint Software Manager. If your vs code is install via Software Manager, it will be install in Flatpak virtual sandbox. Just download and run vs code from its homepage will do.

Sign up to request clarification or add additional context in comments.

1 Comment

Confirmed! Installed VS Code via the *.deb installer and after chosing the right interpreter it works now! Thanks a lot!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.