Python Idle won't start

Output of "idle &" in terminal after garuda linux upgrade:

File "/usr/bin/idle", line 3, in
from idlelib.pyshell import main
File "/usr/lib/python3.10/idlelib/pyshell.py", line 53, in
from idlelib import debugger
File "/usr/lib/python3.10/idlelib/debugger.py", line 7, in
from idlelib import macosx
File "/usr/lib/python3.10/idlelib/macosx.py", line 7, in
from test.support import requires, ResourceDenied
ModuleNotFoundError: No module named 'test'

Do not know how to reinstall test.support package in python again. If I would know that, that will fix this issue.

Welcome :slight_smile:
Seems python-setuptools

[2022-10-14T16:26:48+0200] [ALPM] upgraded python-setuptools (1:63.3.0-1 -> 1:63.4.0-1)

brake something.

There is no tutorial about it on the internet, no python forum?
No error message on github/gitlab or wherever the source code is viewable for python?

Unfortunately you didn't post your garuda-inxi either, maybe you just need to reboot.

Summary

Unfortunately I do not know anything about it.

idle &
** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **

I can put output of garuda-inxi, but that's not linked to this problem, because it's obvious, python test package can not be found (imported) in macosx.py file and because of that it's needed to be re-installed, but I don't know how because that package can be a part of another package which should be reinstalled or it has different name than 'test'. I will try with python-setuptools.

Don't be mad at me, but if you read the template, we would always like to have the garuda-inxi no matter what someone believes or is obvious.

Maybe someone else from the forum can help you here, but the fault is not Garuda.
And we are not a python school either, so as also mentioned in the template, have you done any research on the internet?

Here again to read up.

Hello Garuda users.

Please read the following template before requesting assistance:

Please post the terminal/konsole input and output as text (no pictures) from the the following command:

garuda-inxi

Refusing to post the output of the required "garuda-inxi" on a help request will likely result in you not receiving any help from the Garuda team. A failure to provide your system specs may also result in your thread being closed without notice, (as without this information providing assistance is often next to impossible).

Before opening a new help request, please search the Arch and Garuda Wiki's, and read any relevant sections related to your issue. Also, thoroughly search any error messages in the forum's search engine and on the web. For in depth information on how to search for answers to Linux issues effectively read the tips on the Garuda Wiki:

Garuda Linux wiki

How to search for solutions the right way

Find out what steps to take in order to find a solution to a problem

Please report in detail everything you have already attempted to solve your problem.

The template above should be deleted before posting your help request.

Close

2 Likes

Hello. All I know is it happens here too. No Idea.
I'm not finding anything useful online, not the same error.
I just updated and rebooted, no difference.
I never noticed before but it was there before the very last update.

1 Like

Emergency solution would be to work with a snapshot until the error is fixed.
Making an error message by python can't hurt.

cat /var/log/pacman.log | grep -E 'installed|upgraded|removed' | grep python

Not mad, just wanted to explained the main issue, because I'm also programming in python for 6 months and I'm programmer for more than 20 years. I was just wondering if someone knows where python test package, which also has test.support, can be found.

SGS I did, but i didn't find anything useful so I turned here for help.

1 Like

Output of garuda-inxi:

System:
Kernel: 5.15.73-3-lts arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts
root=UUID=5f54c6e6-04e9-4d49-b877-f60ee4fd8819 rw [email protected]
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
resume=UUID=08023e96-8cab-4958-9901-c544ea8da635 loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.26.0 tk: Qt v: 5.15.6 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: Hewlett-Packard product: HP Elite 7500 Series MT
v: 1.00 serial: <superuser required> Chassis: type: 3
serial: <superuser required>
Mobo: PEGATRON model: 2AD5 v: 1.03 serial: <superuser required> UEFI: AMI
v: 8.11 date: 10/23/2012
CPU:
Info: model: Intel Core i7-3770 bits: 64 type: MT MCP arch: Ivy Bridge
gen: core 3 level: v2 built: 2012-15 process: Intel 22nm family: 6
model-id: 0x3A (58) stepping: 9 microcode: 0x21
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
L3: 8 MiB desc: 1x8 MiB
Speed (MHz): avg: 2764 high: 3704 min/max: 1600/3900 scaling:
driver: intel_cpufreq governor: performance cores: 1: 1824 2: 3371 3: 3283
4: 1678 5: 1701 6: 3665 7: 3704 8: 2893 bogomips: 54273
Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: mmio_stale_data status: Unknown: No mitigations
Type: retbleed status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
prctl and seccomp
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
sanitization
Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
STIBP: conditional, RSB filling, PBRSB-eIBRS: Not affected
Type: srbds status: Vulnerable: No microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA GF108 [GeForce GT 620] vendor: ASUSTeK driver: nvidia
v: 390.154 alternate: nouveau,nvidia_drm non-free: series: 390.xx+
status: legacy-active (EOL~late 2022) arch: Fermi code: GF1xx
process: 40/28nm built: 2010-16 pcie: gen: 2 speed: 5 GT/s lanes: 16
bus-ID: 01:00.0 chip-ID: 10de:0f01 class-ID: 0300
Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
compositor: kwin_x11 driver: X: loaded: nvidia gpu: nvidia display-ID: :0
screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 92 s-size: 530x301mm (20.87x11.85")
s-diag: 610mm (24")
Monitor-1: HDMI-0 res: 1920x1080 hz: 60 dpi: 92
size: 531x298mm (20.91x11.73") diag: 609mm (23.97") modes: N/A
OpenGL: renderer: GeForce GT 620/PCIe/SSE2 v: 4.6.0 NVIDIA 390.154
direct render: Yes
Audio:
Device-1: Intel 7 Series/C216 Family High Definition Audio
vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
chip-ID: 8086:1e20 class-ID: 0403
Device-2: NVIDIA GF108 High Definition Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:0bea class-ID: 0403
Sound API: ALSA v: k5.15.73-3-lts running: yes
Sound Server-1: PulseAudio v: 16.1 running: no
Sound Server-2: PipeWire v: 0.3.59 running: yes
Network:
Device-1: Qualcomm Atheros AR8161 Gigabit Ethernet vendor: Hewlett-Packard
driver: alx v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000
bus-ID: 03:00.0 chip-ID: 1969:1091 class-ID: 0200
IF: eno1 state: down mac: <filter>
Device-2: D-Link DWA-140 RangeBooster N Adapter(rev.B3) [Ralink RT5372]
type: USB driver: rt2800usb bus-ID: 3-3:4 chip-ID: 2001:3c15 class-ID: 0000
serial: <filter>
IF: wlp0s20u3 state: up mac: <filter>
Drives:
Local Storage: total: 975.86 GiB used: 243.54 GiB (25.0%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital
model: WD10EZEX-60ZF5A0 size: 931.51 GiB block-size: physical: 4096 B
logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
rev: 0A80 scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 type: USB model: General USB Flash Disk
size: 15.02 GiB block-size: physical: 512 B logical: 512 B type: SSD
serial: <filter> rev: 1100 scheme: MBR
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
ID-3: /dev/sdc maj-min: 8:32 type: USB vendor: SanDisk
model: Cruzer Blade size: 29.32 GiB block-size: physical: 512 B
logical: 512 B type: N/A serial: <filter> rev: 1.00 scheme: MBR
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
ID-1: / raw-size: 922.93 GiB size: 922.93 GiB (100.00%) used: 243.54 GiB
(26.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 592 KiB
(0.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 922.93 GiB size: 922.93 GiB (100.00%) used: 243.54
GiB (26.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-4: /var/log raw-size: 922.93 GiB size: 922.93 GiB (100.00%) used: 243.54
GiB (26.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-5: /var/tmp raw-size: 922.93 GiB size: 922.93 GiB (100.00%) used: 243.54
GiB (26.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 3.77 GiB used: 914.5 MiB (23.7%)
priority: 100 dev: /dev/zram0
ID-2: swap-2 type: partition size: 8.29 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/sda3 maj-min: 8:3
Sensors:
System Temperatures: cpu: 45.0 C mobo: N/A gpu: nvidia temp: 49 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 69%
Info:
Processes: 285 Uptime: 18m wakeups: 0 Memory: 3.77 GiB used: 2.08 GiB
(55.2%) Init: systemd v: 251 default: graphical tool: systemctl
Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: 1937 pm: pacman pkgs: 1933
libs: 437 tools: octopi,pamac,paru pm: flatpak pkgs: 4 Shell: fish v: 3.5.1
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.22
Garuda (2.6.8-1):
System install date:     2022-06-14
Last full system update: 2022-10-14
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       No/Undetected
Snapshots:               Snapper
Failed units:            bluetooth-autoconnect.service
1 Like

Maybe the better place is

2 Likes

ok, will try there

??? :slight_smile:

https://devguide.python.org/testing/run-write-tests/index.html

After I started command:

python -m test

same reply in my terminal:

/usr/bin/python: No module named test

SGS, thx for your help anyway, will try on Python forums as well after I read that article about python tests

1 Like

I found a solution:

I downloaded python 3.10.8 from:

I extracted .xz package in /home/totalmachine/Downloads/Packages/Python/ and did this:

sudo cp -r /home/totalmachine/Downloads/Packages/Python/Python-3.10.8/Lib/test /usr/lib/python3.10/test

When I started IDLE, there were no problems anymore.

1 Like

Good catch.
I see I don't have a test package, but a unittest in /usr/lib/python3.10/.
It's long I don't do any Python, but I guess idle is not receiving much attention lately.

1 Like

Regression test package, which was missing, is a part of Python Standard Library which is linked to current python version in general, so that library can't be upgraded as an extension. So only solution was to find that package inside extracted and downloaded file of python 3.10.8 (because I use last working version as well) inside it's Library folder. So it's path is .....Python/Lib/test.

Enjoy & Stay well.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.