I am trying to install Tkinter for PyDictionary which has installed fine, but Tkinter has not.
pip install tkinter
But this error has arisen:
ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter
Anyone know any possible ways of fixing it? I downloaded python from python.org and I am coding on Visual Studio Code.
Related
I am doing a project with PyQt5 and whenever I run the PyQt5 code I get this error:
ImportError: Unable to import required Qt libraries from PySide2! Please set the 'ICONIFY_QTLIB' env var to the location of a Qt5 compliant python binding you would like to use.
And when I want to install PySide2, I face this problem:
ERROR: Could not find a version that satisfies the requirement PySide2 (from versions: none)
ERROR: No matching distribution found for PySide2
I have used different commands but none of them worked.
I have encountered this problem
Linux, pop_os, vs code, python3
import tkinter as tk
win = tk.Tk()
win.title("Hello World")
win.mainloop()
python main.py -> ModuleNotFoundError: No module named 'tkinter'
python3-tk and python-tk already installed with apt
python --version (in vs code terminal) -> Python 3.9.9
pip3 install tk (in vs code terminal) -> Requirement already satisfied: tk in /var/data/python/lib/python3.9/site-packages (0.1.0)
pip3 install tkinter (in vs code terminal) -> ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter
When you can successfully run the code in the external terminal, it indicates that this is not a package problem.
In the comments, Roland Smith said clearly that you need to configure the correct interpreter for vscode by the following way:
use shortcut "ctrl+shift+P"
type "Python: select interpreter"
choose the correct interpreter.
while importing the required modules i got stuck while importing the Tkinter
(base) C:\Users\sumanthkatari>pip install tkinter
ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter
I'm getting this type of error when installing the library.
Not for all packages, but only for some. Is it because pip version? or Because of python interpreter?
Plz guide me what should I do.
You don't need to install this package because it's already in the standard library.
Just import time in any Python file.
I'm trying to import pygame on pycharm, i already have installed pygame and it runs when i execute programs by command line, but when i try to use it from pycharm it doesn't work. I tried to add it to the project interpreter but an error occurs:
Non-zero exit code (1)
Collecting Pygame
No matching distribution found for Pygame the requirement Pygame (from versions: )
Also triedpip install Pygame from command line but occurs:
Collecting Pygame
Could not find a version that satisfies the requirement Pygame (from versions: )
No matching distribution found for Pygame
I'm running python 3.5 and pygame v1.9.1 and pycharm is updated.
Os: Linux Mint 17.3
I solved the problem by uninstalling and reinstalling pygame making sure to correctly solve all dependencies as explained by the wiki