-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Install source and version
- Installed from the Windows Store
- Installed with the MSIX from python.org
- Installed with the MSI from python.org
- Installed with
winget install 9NQ7512CXL7T
Version: for example, 25.2
Describe the bug
Python 2.7 installed via pymanager fails trying to import Tkinter with ImportError: No module named _tkinter.
To Reproduce
pymanager install 2.7
py -V:2.7 -c "import Tkinter"
Expected behavior
No error importing Tkinter
Additional context
The following shows the output running the import Tkinter command. First on a freshly installed Python 2.7 with the traditional installer vs. what happens after installing it with pymanager
PS C:\Users\pf_arc> pymanager list
Tag Name Managed By Version Alias
3.14[-64] * Python 3.14.2 PythonCore 3.14.2 python3[-64].exe, python3.14[-64].exe
3.12[-64] Python 3.12.10 PythonCore 3.12.10 python3.12[-64].exe
3.10[-64] Python 3.10.11 PythonCore 3.10.11 python3.10.exe
* These runtimes were found, but cannot be updated or uninstalled. *
2.7 Python 2.7 PythonCore 2.7
PS C:\Users\pf_arc> py -V:2.7 -c "import Tkinter"
PS C:\Users\pf_arc> pymanager install 2.7
Installing Python 2.7.18.
Extracting: ...................................................................✅
Global shortcuts directory is not on PATH. Add it for easy access to global Python aliases.
Directory to add: C:\Users\pf_arc\AppData\Local\Python\bin
PS C:\Users\pf_arc> py -V:2.7 -c "import Tkinter"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\SW\Python\pythoncore-2.7-64\lib\lib-tk\Tkinter.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
PS C:\Users\pf_arc>
Metadata
Metadata
Assignees
Labels
No labels