% python3 ~/Desktop/notepad.py
Traceback (most recent call last):
File "/Users/dev/Desktop/notepad.py", line 1, in
import tkinter as tk
File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/
Python.framework/Versions/3.11/lib/python3.11/tkinter/__init__.py", line 38, in
import _tkinter # If this fails your Python may not be configured for Tk
^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_tkinter'
% pip3 install tkinter
ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter
If while installing tkinter using the pip or pip3 command on the Terminal you get an error that says "Could not find a version that satisfies the requirement tkinter" then you should try to run the following command.
pip3 install Tk interface
or,
brew install python-tk
Installation Logs:
Collecting Tk
Downloading tk-0.1.0-py3-none-any.whl (3.9 kB)
Collecting interface
Downloading Interface-2.11.1.tar.gz (19 kB)
Preparing metadata (setup.py) ... done
Collecting zope.interface (from interface)
Obtaining dependency information for zope.interface from https://files.pythonhosted.org/packages/3e/1f/43557bb2b6e8537002a5a26af9b899171e26ddfcdf17a00ff729b00c036b/zope.interface-6.1-cp311-cp311-macosx_11_0_arm64.whl.metadata
Downloading zope.interface-6.1-cp311-cp311-macosx_11_0_arm64.whl.metadata (41 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.7/41.7 kB 499.9 kB/s eta 0:00:00
Collecting zope.schema (from interface)
Downloading zope.schema-7.0.1-py3-none-any.whl (85 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.9/85.9 kB 2.1 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /opt/homebrew/lib/python3.11/site-packages (from zope.interface->interface) (68.1.2)
Collecting zope.event (from zope.schema->interface)
Obtaining dependency information for zope.event from https://files.pythonhosted.org/packages/fe/42/f8dbc2b9ad59e927940325a22d6d3931d630c3644dae7e2369ef5d9ba230/zope.event-5.0-py3-none-any.whl.metadata
Downloading zope.event-5.0-py3-none-any.whl.metadata (4.4 kB)
Downloading zope.interface-6.1-cp311-cp311-macosx_11_0_arm64.whl (202 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 202.5/202.5 kB 3.2 MB/s eta 0:00:00
Downloading zope.event-5.0-py3-none-any.whl (6.8 kB)
Building wheels for collected packages: interface
Building wheel for interface (setup.py) ... done
Created wheel for interface: filename=Interface-2.11.1-py3-none-any.whl size=39542 sha256=7f6fd1930c41e2fa7291020f1ceb78266e66488ca56808b726aa12880ed328e4
Stored in directory: /Users/dev/Library/Caches/pip/wheels/43/87/c4/26bb0094fb7bf2847ef9ebc3d631e34f3186fc5338b272a8c4
Successfully built interface
Installing collected packages: Tk, zope.interface, zope.event, zope.schema, interface
Successfully installed Tk-0.1.0 interface-2.11.1 zope.event-5.0 zope.interface-6.1 zope.schema-7.0.1
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Python,
- Python List of Lists with Examples
- Fix: ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none) ERROR: No matching distribution found for tkinter
- How to Convert Python Notebook .ipynb (JSON) to Executable .py Module
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python]
- Python: Pandas Merge Indicator (Left, Right and Both) Example
- Fix: EOFError Exception in Python
- How to URL Decode a Query String in Python
- How to take user input from the console in a Python program
- Compare two lists in Python and return matches
- How to change the Python Default version
- Fix: KeyError: exception in Python
- How to get the Execution Time of A Python Program
- Fix: ModuleNotFoundError: No module named boto3 [Python]
- How to get unique values from a list in Python
- How to pip install Python Modules in VSCode
- Python: Fix - TypeError: NoneType object is not iterable
- How to delete a file using Python code example
- How to create a dictionary comprehension in Python
- Python: Get just the filename without extension using Path
- How to comment out a block of code in Python
- How to add two float numbers in Python
- Python: How to POST Json Data with HTTP Request
- Get MD5 Hash as Checksum of a String in Python
- Python - Convert float to String
- How to Parse XML String in Python
More Posts:
- Pure JavaScript Digital Clock Widget to get GMT/UTC Time Now - JavaScript
- [Java] NoClassDefFoundError Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory - Java
- Stop android adb service from command prompt or terminal - Android
- How to Split on String in Java with Regular Expressions by Dot. - Java
- Get the Complete Sha256 Container ID for Docker Run Command - Docker
- Nano Show Line Numbers - Linux
- Online Free Notepad App - Tools
- npm WARN saveError ENOENT: no such file or directory, open /mnt/c/package.json - JavaScript