Thonny not starting
I just installed Thonny using sbopkg on my laptop and it will not load.
When I click the Thoony icon on the start menu Thommy appears on the bottom of the screen for a minute then disappears. The install went ahead with no errors. I'm running 14.2 and a KDE Desktop. |
This?
https://thonny.org/ Quote:
What is the output of Code:
python |
Quote:
Code:
bash-4.3$ python |
Ok, you have python2 installed. How about python3? It says that thonny is python3.
What does thonny in the terminal say? Is python3 in your $PATH? Find out why thonny dies. |
Quote:
here is my path: Quote:
|
Quote:
here is my path: Quote:
Quote:
|
python3 seemed to install OK with no errors however it clearly has not installed.
What would stop it being installed yet bring up no errors? Quote:
Quote:
|
....however if I ls packages, python3-3.7.2-x86_64-1_SBo is listed.
|
you need to start python3 with the command python3 (instead of python, which defaults to python2).
I don't really know how did you try to start thonny, but probably Code:
pip3 install thonny |
Interesting that Tkinter is not included in sbopkg or slackpkg - is that telling me something?
|
Code:
pip3 install thonny Code:
bash-4.3# pip3 install thonny > thonny.txt |
I dont get it
On KDE nothing loads No Python2, no Python3 and no Thonny On the treminal both Python 2 & 3 open Thonny does not. I wish I knew what this means: Quote:
|
Quote:
Start with some basics. In a terminal, can you open a python3 shell. You already established that you have python2 working.(post3-7) Find out where python3 is. And if your shell have a PATH to the executable. Looks like it does. Example: (arch) Code:
python Code:
which python Then in the working python3 shell Code:
python In python2 it was Tkinter, in python3 it is tkinter. Edit: You need to troubleshoot this a step at a time. |
Quote:
Maybe python3 was compiled without TK support. So it seems it could be installed with : > pip3 install tk |
Here is the source. Which is where you would first look, if you are trying to build something.
https://github.com/thonny/thonny Look at the error in post #12 Code:
File "/usr/lib64/python3.7/site-packages/thonny/config.py", line 9, in <module> https://github.com/thonny/thonny/blo...onny/config.py And here https://github.com/thonny/thonny/blo...ny/__init__.py You don't have tkinter working. Start with fixing that. Show what eroors you are getting step by step. Or you will never get anywhere. |
Quote:
Quote:
Code:
# sqg -p thonny Quote:
Code:
Code:
Quote:
Quote:
Quote:
Quote:
|
How do I configure python for Tk?
As per the final error in #12 above. I'm guessing that the standard Python install does not use Tk. Tk is something unique to Thonny |
Quote:
I always understood the dependencies were all installed as a package when using sbopkg |
Open a python3 shell, and see if you can import tkinter. If not what is the error.
Or just keep ignoring the advise you are given. Edit: https://docs.python.org/3/index.html https://docs.python.org/3/library/tkinter.html |
I removed Python3 and reinstalled it paying particular attention to the output. It was very fast but I did see mention of tk flash past but it still was not installed
|
You are new to python. You are going to have an impossible time, unless you start at step one, then 2...
Arch calls python3 python, Slack might call that python3. It's your box, find out. Code:
python |
Quote:
|
Quote:
Quote:
|
Quote:
@FlinchX says Slack calls python3.python3 Are you going to post that or not? Code:
python3 Or, you could check and see if you have that installed. |
After you get/have python3 working, tk/tcl installed so that tkinter will work...
Here is a simple little test script to see if all is well, with tkinter. test.py Code:
#!/usr/bin/python Code:
python3 ./test.py |
Quote:
|
Quote:
|
@SAJM Did you have a full 14.2 install before you started to install SBo things?
|
Quote:
[CODE} bash-4.3$ python3 ./test.py Traceback (most recent call last): File "./test.py", line 3, in <module> from tkinter import * File "/usr/lib64/python3.7/tkinter/__init__.py", line 36, in <module> import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter' bash-4.3$ [/CODE] EDIT oops I just noticed I should have run this after the Tk issue was resolved!! |
Im going to remove everything and start again in this order
1. Install Python3 2. Install Thonny Paying particular attention to dependencies. |
Does another Slacker know what slack package contains tcl/tk? Python3.7 + comes with tkinter. But it won't work without tk.
This http://tcl.sourceforge.net/ https://docs.python.org/3/library/tkinter.html https://www.geeksforgeeks.org/introduction-to-tkinter/ https://www.tutorialspoint.com/tcl-tk/index.htm https://tkdocs.com/tutorial/install.html |
Im going to remove everything and start again in this order
1. Install Python3 2. Install Thonny Paying particular attention to dependencies. |
Quote:
|
Code:
bash-4.3# python3 But it does not launch in the GUI, I don't know if that's a problem or not at this stage? |
Code:
bash-4.3# python3 |
Quote:
Code:
$ (cd /var/adm/packages && ls -1 tcl* tk*) |
I do not believe pip is installed
[code] bash-4.3# pip help Traceback (most recent call last): File "/usr/bin/pip", line 7, in <module> from pip._internal.cli.main import main File "/usr/lib64/python3.7/site-packages/pip/_internal/__init__.py", line 40, in <module> from pip._internal.cli.autocompletion import autocomplete File "/usr/lib64/python3.7/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module> from pip._internal.cli.main_parser import create_main_parser File "/usr/lib64/python3.7/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module> from pip._internal.cli import cmdoptions File "/usr/lib64/python3.7/site-packages/pip/_internal/cli/cmdoptions.py", line 17, in <module> from pip._internal.locations import USER_CACHE_DIR, src_prefix File "/usr/lib64/python3.7/site-packages/pip/_internal/locations/__init__.py", line 14, in <module> from . import _distutils, _sysconfig File "/usr/lib64/python3.7/site-packages/pip/_internal/locations/_sysconfig.py", line 8, in <module> from pip._internal.exceptions import InvalidSchemeCombination, UserInstallationInvalid ImportError: cannot import name 'InvalidSchemeCombination' from 'pip._internal.exceptions' (/usr/lib64/python3.7/site-packages/pip/_internal/exceptions.py) bash-4.3# [/ode] I understood pip was installed with python? |
pip now installed
|
OK there is some progress
Code:
bash-4.3# pip install tk |
[code]
You should consider upgrading via the 'pip install --upgrade pip' command. bash-4.3# pip install tkinter DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none) ERROR: No matching distribution found for tkinter bash-4.3# [/quote] How do I tell pip to use python3? |
Here is the problem I think
Do I uninstall python2. I didn't do that earlier in case I messed up with a dependency for an existing program Code:
bash-4.3# pip -V |
Not sure what this is telling me?
Code:
bash-4.3# sbofind pip |
Stack overflow at
https://stackoverflow.com/questions/...d-of-python2-7 suggested: Code:
|
These from the same source did not work.
python3 -m pip install tk or pip3 install --upgrade --force pip |
That's it. I'm defeated
I could uninstall Python 2 but as I mentioned earlier I'm nervous about messing something else up that may be depending on it. |
Quote:
Quote:
|
Quote:
tk is installed but I think it is defaulting to python2 |
However when I do this:
Code:
bash-4.3# which tk |
Why did you do :
pip install tk pip install tkinter ? for python3 it is like I said some posts above : pip3 install tk and maybe : pip3 install tkinter pip3 is for python3 and pip for python which is python2 tkinter is only for python3 Just to verify if tk for python3 is here as it seems something is missing. |
To test if Tcl and Tk are installed, you can also test if wish is present :
> which wish tkinter is a module for Python3 which encapsulate Tcl/Tk. It needs Tcl and Tk. So if tkinter is installed it won't work without Tcl and Tk installed. Or tkinter is not installed. pip3 will tell you in either case. |
All times are GMT -5. The time now is 06:32 AM. |