Error no matching distribution found for tkinter

Мне нужен ТК но его по дефолду нет! Устанавливал tlc, tk, python-tk. Всё равно пишет что нету. Если точнее то я хотел модуль turtel, но он зависит от тк(turtel установлен). Traceback (most recent call last): File «/home/mike/Документы/trening.py», li...

если версия python 2.7 к примеру то там надо писать Tkinter а не tkinter

  • Ссылка

по дефолту он всегда есть, какая версия python то?

  • Ссылка

плюсую товарища выше — ты установил python-tk, а он для второго питона. python3-tk нужно

gnunixon ★★★

(27.10.20 23:10:30 MSK)

  • Показать ответ
  • Ссылка

На будущее. Что бы не возникало казусов вроде смешивания пакетов python-tk и python3-tk, устанавливай питоновские пакеты через pip, а не через системный менеджер пакетов.

Aswed ★★★★★

(28.10.20 11:26:30 MSK)

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от fsb4000 27.10.20 22:59:05 MSK

Спасибо вам большое! Работает!!!!!!

mike15

(28.10.20 14:43:57 MSK)

  • Ссылка

Ответ на:

комментарий
от Aswed 28.10.20 11:26:30 MSK

устанавливай питоновские пакеты через pip, а не через системный менеджер пакетов.

Совет от debiloida и полнейшего idiotes.

anonymous

(28.10.20 15:20:28 MSK)

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от anonymous 28.10.20 15:20:28 MSK

Куда уж мне до анонимусов на лоре. Смотри не увлекайся коментами, а то на математику опоздаешь.

Aswed ★★★★★

(29.10.20 12:22:12 MSK)

  • Ссылка

Ответ на:

комментарий
от gnunixon 27.10.20 23:10:30 MSK

$ sudo python3 -m pip install python3-tk
...
ERROR: Could not find a version that satisfies the requirement python3-tk (from versions: none)
ERROR: No matching distribution found for python3-tk

Можете подсказать, ЧЯДНТ?

zad1ra

(29.10.20 17:35:26 MSK)



Последнее исправление: zad1ra 29.10.20 17:35:56 MSK
(всего

исправлений: 1)

  • Показать ответ
  • Ссылка

29 июля 2022 г.

Ответ на:

комментарий
от zad1ra 29.10.20 17:35:26 MSK

Аналогичная проблема. Линукс вот какой:

root@porteus:/tmp# uname -a
Linux porteus 4.9.0-porteus #1 SMP PREEMPT Sun Dec 18 16:24:27 Local time zone must be set-- i686 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz GenuineIntel GNU/Linux

Как это лечить?

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от senglory 29.07.22 19:29:47 MSK

Ответ на:

комментарий
от vvn_black 29.07.22 21:30:59 MSK

Неа, не помогло:

root@porteus:/tmp# pip install tk
Collecting tk
  Downloading tk-0.1.0-py3-none-any.whl (3.9 kB)
Installing collected packages: tk
Successfully installed tk-0.1.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

root@porteus:/tmp# pip install python3-tk
ERROR: Could not find a version that satisfies the requirement python3-tk (from versions: none)
ERROR: No matching distribution found for python3-tk
root@porteus:/tmp# 

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от senglory 29.07.22 23:30:13 MSK

Ответ на:

комментарий
от vvn_black 29.07.22 23:31:21 MSK

Но python3-tk как не ставился , так и сейчас не ставится. Что у меня неправильно сделано?

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от senglory 29.07.22 23:35:53 MSK

Извинения, я затупил. Дистрибутивный python должен быть собран с поддержкой tk.

vvn_black ★★★★★

(29.07.22 23:48:40 MSK)



Последнее исправление: vvn_black 29.07.22 23:56:57 MSK
(всего

исправлений: 1)

  • Ссылка

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.

Люди: у меня похожая проблема — не устанавливается «tkinter»:

Кликните здесь для просмотра всего текста

pip install tkinter
ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter

Я занялся изучением «Python», и пробуя установить среду использовал следующие варианты:
«Anaconda» — «tkinter» не ставится.
«python-3.6.0» (для моей Windows 7) — в командной строке отказался устанавлявать библиотеки, «почитав» выяснил — что нужно виндовую командную строку (FarComander не прокатил)(а «Anaconda» нормально в своей строке ставила); и здесь получил ошибки на «pip install pyautogui»:

Кликните здесь для просмотра всего текста

***Running setup.py install for pyautogui … done
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
mouseinfo 0.1.3 requires Pillow<=3.4.2,>=2.0.0; python_version == «3.2», but you have pillow 8.3.2 which is incompatible.
mouseinfo 0.1.3 requires Pillow<=4.3.0,>=2.0.0; python_version == «3.3», but you have pillow 8.3.2 which is incompatible.
mouseinfo 0.1.3 requires Pillow<=5.4.1,>=2.5.0; python_version == «3.4», but you have pillow 8.3.2 which is incompatible.
Successfully installed Pillow***

и ту-же ошибку на «pip install tkinter».
— Может этого пакета вообще нету? Может его переименовали? Или мне пакет для игр ставить ?

Добавлено через 14 минут
Вычитал что «tkinter» уже установлен в системе (у меня семёрка) и инсталлировать его не надо — а просто подключить:

import tkinter

Анаконда

на это выдала:

Кликните здесь для просмотра всего текста

Имя «import» не распознано как имя командлета, функции, файла скрипта или выпол
няемой программы. Проверьте правильность написания имени, а также наличие и пра
вильность пути, после чего повторите попытку.
строка:1 знак:7
+ import <<<< tkinter
+ CategoryInfo : ObjectNotFound: (import:String) [], CommandNotFo
undException
+ FullyQualifiedErrorId : CommandNotFoundException

— что это значит?

Posts: 382

Threads: 94

Joined: Mar 2017

Reputation:
-12

© 2017 Microsoft Corporation. All rights reserved.

C:WINDOWSsystem32>pip install tkinter
Collecting tkinter
Could not find a version that satisfies the requirement tkinter (from versions: )
No matching distribution found for tkinter

C:WINDOWSsystem32>
Hi all ! Is there somebody that can help me. The file worked well with linux, and I should like it does the same with windows. Windows does not find the module tkinter. As you see above, I cannot install tkinter. I use Pycharm, my interpreter is python 3.6.

Posts: 3,889

Threads: 56

Joined: Jan 2018

Reputation:
307

I think tkinter is included in python, you don’t need to install it. Try the statement import tkinter in the python interpreter. If there is no error message, it means that you already have tkinter.

Posts: 7,843

Threads: 148

Joined: Sep 2016

Reputation:
572

tkinter is included by default in the windows python distribution

sylas

Minister of Silly Walks


Posts: 382

Threads: 94

Joined: Mar 2017

Reputation:
-12

I found tkinter in C:Program FilesPython36Libtkinter…………….and I tried to import it. I got this message:
The project at C:Program FilesPython36Libtkinter uses a non-standard layout and cannot be attached to this project. Would you like to open it in a new window? …y/n ?
What do I reply ? yes or no ? Thanks

Posts: 7,843

Threads: 148

Joined: Sep 2016

Reputation:
572

(Feb-14-2018, 09:03 AM)sylas Wrote: I tried to import it.

how do you try to import it?

try to run this minimal application

import tkinter as tk

class Application(tk.Frame):
    def __init__(self, master=None):
        super().__init__(master)
        self.pack()
        self.create_widgets()

    def create_widgets(self):
        self.hi_there = tk.Button(self)
        self.hi_there["text"] = "Hello Worldn(click me)"
        self.hi_there["command"] = self.say_hi
        self.hi_there.pack(side="top")

        self.quit = tk.Button(self, text="QUIT", fg="red",
                              command=root.destroy)
        self.quit.pack(side="bottom")

    def say_hi(self):
        print("hi there, everyone!")

root = tk.Tk()
app = Application(master=root)
app.mainloop()

https://docs.python.org/3/library/tkinter.html#a-simple-hello-world-program

Posts: 11,572

Threads: 446

Joined: Sep 2016

Reputation:
444

run python3 from command line and see if you can import tkinter.

Your python may be defaulting to python 2.7
in 2.7 it’s import Tkinter with capital ‘T’
You might have messed up your version by running pip.
Also, I believe there are still some versions of python that
don’t automatically install it.

Posts: 7,843

Threads: 148

Joined: Sep 2016

Reputation:
572

OP clearly has python 3.6 with tkinter, based on path C:Program FilesPython36Libtkinter
based on error The project at C:Program FilesPython36Libtkinter uses a non-standard layout and cannot be attached to this project I think when OP says he is trying to import tkinter they are actually trying to include tkinter folder to PyCharm project, but that is just wild guess

sylas

Minister of Silly Walks


Posts: 382

Threads: 94

Joined: Mar 2017

Reputation:
-12

I tried Buran’s file. Always my PC cannot find the module tkinter. All my projects come from my 32bits old PC. I put the project from the USB key into my 64bits PC.First I create a new Project with a name about the same as my old project. Then I import my ancient project with just : File>Open>OK. All files are there,ready to go, and all of them work well, except those with tkinter and pygame….Something I don’t like: when I choose the interpreter I have about 10 different python3.6, all of them with the suffix venv. As i know nothing about vitual environment it is not pleasant to choose a venv, but I cannot do otherwise.

Posts: 7,843

Threads: 148

Joined: Sep 2016

Reputation:
572

Don’t try it from within PyCharm. Just open Notepad, paste my code, save the file as hello.py, then open command prompt, change CWD to folder where hello.py is and type in cmd prompt python hello.py

sylas

Minister of Silly Walks


Posts: 382

Threads: 94

Joined: Mar 2017

Reputation:
-12

Thanks Buran. I opened Notepad, I saved «hello.py», after that I am lost. «Open command prompt», do you mean terminal ? «Change CWD to folder», there I don’t know «CWD». Explain please.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Error no matching distribution found for cv2
  • Error no document variable supplied
  • Error no display environment variable specified linux
  • Error no display environment variable specified firefox
  • Error no devices emulators found перевод

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии