Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Idle won't start
#1
Output of "idle &" in terminal after garuda linux upgrade:

Error:
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.
Yoriz write Oct-14-2022, 04:38 PM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply
#2
(Oct-14-2022, 04:12 PM)totalmachine Wrote: @Yoriz write 18 minutes ago:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.


There's no programming code, it's Python Idle (Tool) which can't be started after upgrade of my linux distribution. If I would know where I can find python test package, which is missing, which also has support (test.support) package, this problem would be solved. I can't find and install any python package by name test so I suppose test package is contained in other package or it can be found under different name than test. Thx in advance.
Reply
#3
try to install python3-testresources
Reply
#4
(Oct-14-2022, 05:16 PM)Axel_Erfurt Wrote: try to install python3-testresources

I tried, but Garuda linux is archlinux based. So I tried three options:

1) pip install python3-testresource:

Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement python3-testresource (from versions: none)
ERROR: No matching distribution found for python3-testresource

2) sudo pacman -Syy python3-testresources:

Synchronising package databases...
garuda 94,8 KiB 19,5 KiB/s 00:05 [------------------------------------] 100%
core 156,4 KiB 91,4 KiB/s 00:02 [------------------------------------] 100%
extra 1721,4 KiB 369 KiB/s 00:05 [------------------------------------] 100%
community 7,0 MiB 731 KiB/s 00:10 [------------------------------------] 100%
multilib 169,7 KiB 115 KiB/s 00:01 [------------------------------------] 100%
chaotic-aur 2,3 MiB 156 KiB/s 00:15 [------------------------------------] 100%
error: target not found: python3-testresources

3) pip install testresources

Defaulting to user installation because normal site-packages is not writeable
Collecting testresources
Downloading testresources-2.0.1-py2.py3-none-any.whl (36 kB)
Collecting pbr>=1.8
Downloading pbr-5.10.0-py2.py3-none-any.whl (112 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 112.4/112.4 kB 337.4 kB/s eta 0:00:00
Installing collected packages: pbr, testresources
Successfully installed pbr-5.10.0 testresources-2.0.1

but after I started: idle & in terminal I got same response as I had it before I installed testresources. It should be other package.
Reply
#5
Anything new?
Reply
#6
Do this from command line and post output.
python3- V
python- V
which python3
which python

pip -V
pip3 -V

# Try start Idle like this
python3 -m idlelib
Problem try to do new install
How to Install IDLE Python
Don't know pacman package manager deal with have to search for that.

IDLE is not good,unfortunately so has Python not address this problem it has been up for debate many times.
Usually only beginner that use IDLE before they find something better.
Reply
#7
(Oct-15-2022, 05:43 PM)snippsat Wrote: Do this from command line and post output.
python3- V
python- V
which python3
which python

pip -V
pip3 -V

# Try start Idle like this
python3 -m idlelib
Problem try to do new install
How to Install IDLE Python
Don't know pacman package manager deal with have to search for that.

IDLE is not good,unfortunately so has Python not address this problem it has been up for debate many times.
Usually only beginner that use IDLE before they find something better.

After I run:

python3 -m idlelib

I got almost same response:

Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.10/idlelib/__main__.py", line 6, in <module>
import idlelib.pyshell
File "/usr/lib/python3.10/idlelib/pyshell.py", line 53, in <module>
from idlelib import debugger
File "/usr/lib/python3.10/idlelib/debugger.py", line 7, in <module>
from idlelib import macosx
File "/usr/lib/python3.10/idlelib/macosx.py", line 7, in <module>
from test.support import requires, ResourceDenied
ModuleNotFoundError: No module named 'test'

Python3 version:

$python3 -V
Output:
Python 3.10.8

Python version:

$python -V
Output:
Python 3.10.8

Pip3 version:

$pip3 -V
Output:
pip 22.2.2 from /home/marko/.local/lib/python3.10/site-packages/pip (python 3.10)
Pip version:

$pip -V
Output:
pip 22.2.2 from /home/marko/.local/lib/python3.10/site-packages/pip (python 3.10)

Which command:

$which python3
Output:
/usr/bin/python3

Which command:

$which python
Output:
/usr/bin/python


I use IDLE as interpreter only to test small part of programming code, otherwise I'm using code (visual studio for Linux).

I saw that regression test package, which is missing and it's absence causes problems, is a part of Python Standard Library and that Python Standard Library can't be upgraded because it is linked to current python version in general and it's not python extension. So probably, issue with IDLE will be fixed when new version of python will come.
Reply
#8
In file /usr/lib/python3.10/idlelib/macosx.py
Comment out line line 7 and save.
#from test.support import requires, ResourceDenied
See if Idle will start now.
Reply
#9
(Oct-16-2022, 12:05 AM)snippsat Wrote: In file /usr/lib/python3.10/idlelib/macosx.py
Comment out line line 7 and save.
#from test.support import requires, ResourceDenied
See if Idle will start now.

I can try it, but that will cause problems because you import something in file because you want to use that in that file. Wherever ResourceDenied occurs in file, if that line is commented will be bug. So, rather I will download python 3.10.7 version and then I will with vitualenv change default version to that mentioned version and then IDLE will work. Otherwise it will be needed to wait for new version of python 3.10.9 because current python standard library can't be upgraded and regression test package is part of it, as it said before in one my previous comment.
Reply
#10
I found a solution:

I downloaded python 3.10.8 from:

https://www.python.org/downloads/release/python-3108/

I extracted .xz file 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 after that, there were no problems anymore.
snippsat likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Why can I not see the code correctly in Python IDLE.? Trump 8 669 Apr-04-2024, 07:47 AM
Last Post: jonesphedra
  Launch Python IDLE Shell from terminal Pavel_47 5 1,225 Feb-17-2023, 02:53 PM
Last Post: Pavel_47
  Start Putty into Python Form Schlazen 5 5,463 Dec-13-2022, 06:28 AM
Last Post: divya130
  Why is IDLE not opening on a MacOS Montery 12.6 and using Python 3.10.7? Merlin385 7 1,677 Oct-08-2022, 08:36 PM
Last Post: Merlin385
  readline.parse_and_bind() does not work in start-up script of Python interpreter zzzhhh 0 1,521 Jan-18-2022, 11:05 AM
Last Post: zzzhhh
  MAC Python IDLE issue shadow12 4 2,531 Oct-29-2021, 12:22 AM
Last Post: shadow12
  Python MYSQL connection does not work after 1h idle zazas321 9 6,769 Oct-07-2021, 12:02 PM
Last Post: ndc85430
  Customize Python Keywords for IDLE alanvers 0 1,997 Apr-03-2021, 10:56 AM
Last Post: alanvers
  Use Python to start/stop a server service via a webform? oakleaf2001 0 1,749 Apr-04-2020, 06:14 AM
Last Post: oakleaf2001
  Python 3.8 on mac failing to start sgandon 0 2,892 Jan-14-2020, 10:58 AM
Last Post: sgandon

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020