How can I install the TKinter in Pycharm

Completed

Hi,

I made in the past one project with Pycharm. I did format at my laptop and i download again the pycharm and now i receive the message << error no module named tkinter>>. I try to install the library for tkinter but i can't find. What can i do?

 

Thanks   

2 comments

Hi!

The correct command in Terminal on Ubuntu 18.04.2 LTS seems to be 'sudo apt-get install python3-tk'!

The longer story:

I just installed PyCharm CE on Ubuntu 18.04.2 LTS.

When I tried to run my first program, I got this error:

"ModuleNotFoundError: No module named 'tkinter'"

But 'tkinter' is not on the list of 'Available Packages' that can be installed in File -> Settings -> Project -> Project Interpreter. There are 11 others, for instance 'tkinter3000' and 'EasyTkinter'.

Then I tried opening the Terminal and run 'pip install python-tk', but I got this error:

" Collecting python-tk
Could not find a version that satisfies the requirement python-tk (from versions: )
No matching distribution found for python-tk "

Then I searched for 'install TKinter in Pycharm' on AskUbuntu.com, and got:

https://askubuntu.com/questions/1001632/unable-to-install-python3-tk-in-my-ubuntu-machine-16-04 .

Where I found the correct command 'sudo apt-get install python3-tk'.

 

0

Please sign in to leave a comment.