LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Thonny not starting (https://www.linuxquestions.org/questions/slackware-14/thonny-not-starting-4175714063/)

teckk 07-02-2022 06:46 AM

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

SAJM 07-02-2022 07:37 AM

Im going to remove everything and start again in this order

1. Install Python3
2. Install Thonny

Paying particular attention to dependencies.

SAJM 07-02-2022 07:42 AM

Quote:

Originally Posted by FlinchX (Post 6365059)
@SAJM Did you have a full 14.2 install before you started to install SBo things?

It was a few years ago but as far as I remember, yes.

SAJM 07-02-2022 08:17 AM

Code:

bash-4.3# python3
Python 3.7.2 (default, Jul  2 2022, 13:59:41)
[GCC 5.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Python3 looks good
But it does not launch in the GUI, I don't know if that's a problem or not at this stage?

SAJM 07-02-2022 08:41 AM

Code:

bash-4.3# python3
Python 3.7.2 (default, Jul  2 2022, 13:59:41)
[GCC 5.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> python -m tkinter
  File "<stdin>", line 1
    python -m tkinter
                    ^
SyntaxError: invalid syntax
>>> python -m tkinter
  File "<stdin>", line 1
    python -m tkinter
                    ^
SyntaxError: invalid syntax
>>> tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'tkinter' is not defined
>>> imprt tkinter
  File "<stdin>", line 1
    imprt tkinter
                ^
SyntaxError: invalid syntax
>>> import tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  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'
>>>

Still no tkinter

Petri Kaukasoina 07-02-2022 08:53 AM

Quote:

Originally Posted by teckk (Post 6365064)
Does another Slacker know what slack package contains tcl/tk? Python3.7 + comes with tkinter. But it won't work without tk.

Code:

$ (cd /var/adm/packages && ls -1 tcl* tk*)                   
tcl-8.6.5-x86_64-2
tclx-8.4.1-x86_64-3
tk-8.6.5-x86_64-2


SAJM 07-02-2022 09:17 AM

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?

SAJM 07-02-2022 09:23 AM

pip now installed

SAJM 07-02-2022 09:26 AM

OK there is some progress

Code:

bash-4.3# pip install tk
Collecting tk
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/a0/81/742b342fd642e672fbedecde725ba44db44e800dc4c936216c3c6729885a/tk-0.1.0.tar.gz
Installing collected packages: tk
  Running setup.py install for tk ... done
Successfully installed tk-0.1.0
You are using pip version 9.0.3, however version 22.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
bash-4.3# pip install tkinter
Collecting tkinter
  Could not find a version that satisfies the requirement tkinter (from versions: )
No matching distribution found for tkinter
You are using pip version 9.0.3, however version 22.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
bash-4.3# pip install --upgrade pip
Cache entry deserialization failed, entry ignored
Collecting pip
  Downloading https://files.pythonhosted.org/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl (1.5MB)
    100% |████████████████████████████████| 1.5MB 56kB/s
Installing collected packages: pip
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
Successfully installed pip-20.3.4
You are using pip version 20.3.4, however version 22.1.2 is available.
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#


SAJM 07-02-2022 09:39 AM

[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?

SAJM 07-02-2022 09:44 AM

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
pip 20.3.4 from /usr/lib64/python2.7/site-packages/pip (python 2.7)


SAJM 07-02-2022 10:01 AM

Not sure what this is telling me?

Code:

bash-4.3# sbofind pip
It looks like you haven't run "sbosnap fetch" yet.
Would you like me to do this now? [y] y
Pulling SlackBuilds tree...
    111,473,616 100%  196.02kB/s    0:09:15 (xfr#57394, to-chk=0/65943) 
SBo:    aeolus 0.9.0
Path:  /usr/sbo/repo/audio/aeolus

SBo:    pip2tgz 0.4
Path:  /usr/sbo/repo/development/pip2tgz

SBo:    pip 9.0.3
Path:  /usr/sbo/repo/python/pip

SBo:    pipdeptree 0.11.0
Path:  /usr/sbo/repo/python/pipdeptree

SBo:    piprot 0.9.10
Path:  /usr/sbo/repo/python/piprot

SBo:    pipstat 0.2.1
Path:  /usr/sbo/repo/python/pipstat

SBo:    python-joblib 0.17.0
Path:  /usr/sbo/repo/python/python-joblib

SBo:    ruffus 2.8.4
Path:  /usr/sbo/repo/python/ruffus


bash-4.3#


SAJM 07-02-2022 10:32 AM

Stack overflow at
https://stackoverflow.com/questions/...d-of-python2-7

suggested:
Code:


bash-4.3# python3 -m pip install --upgrade --force pip
Traceback (most recent call last):
  File "/usr/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib64/python3.7/site-packages/pip/__main__.py", line 16, in <module>
    from pip._internal import main as _main  # isort:skip # noqa
  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#


SAJM 07-02-2022 11:08 AM

These from the same source did not work.

python3 -m pip install tk

or

pip3 install --upgrade --force pip

SAJM 07-02-2022 11:13 AM

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.


All times are GMT -5. The time now is 03:46 PM.