LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-02-2022, 11:22 AM   #46
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,791

Rep: Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470

Quote:
Originally Posted by teckk View Post
I am going to guess that you don't have tk/tcl installed. tkinter wont work without it.

Or, you could check and see if you have that installed.
Quote:
Originally Posted by SAJM View Post
That's it. I'm defeated
So, did you check if you have tk/tcl installed?
 
Old 07-02-2022, 11:49 AM   #47
SAJM
Member
 
Registered: Nov 2012
Location: Essex UK
Distribution: Slackware 15
Posts: 269

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Petri Kaukasoina View Post
So, did you check if you have tk/tcl installed?
See my message 39
tk is installed but I think it is defaulting to python2
 
Old 07-02-2022, 11:58 AM   #48
SAJM
Member
 
Registered: Nov 2012
Location: Essex UK
Distribution: Slackware 15
Posts: 269

Original Poster
Rep: Reputation: Disabled
However when I do this:

Code:
bash-4.3# which tk
which: no tk in (/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin)
 
Old 07-02-2022, 12:33 PM   #49
BrunoLafleur
Member
 
Registered: Apr 2020
Location: France
Distribution: Slackware
Posts: 401

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
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.
 
Old 07-02-2022, 12:42 PM   #50
BrunoLafleur
Member
 
Registered: Apr 2020
Location: France
Distribution: Slackware
Posts: 401

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
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.
 
Old 07-02-2022, 12:44 PM   #51
SAJM
Member
 
Registered: Nov 2012
Location: Essex UK
Distribution: Slackware 15
Posts: 269

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Petri Kaukasoina View Post
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
is this correct?

Code:
bash-4.3$ 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
bash-4.3$
 
Old 07-02-2022, 12:52 PM   #52
SAJM
Member
 
Registered: Nov 2012
Location: Essex UK
Distribution: Slackware 15
Posts: 269

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BrunoLafleur View Post

pip3 is for python3 and pip for python which is python2
I installed pip from sbopkg
There was no option for pip3
 
Old 07-02-2022, 01:05 PM   #53
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Rep: Reputation: Disabled
Quote:
Originally Posted by teckk
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/
Good question, which shouldn't be a problem if OP did a full install of Slackware 14.2. Because while Python3 is a third party package (14.2 comes with Python2 only), SLackware 14.2 comes with tk.


Quote:
Originally Posted by FlinchX
@SAJM Did you have a full 14.2 install before you started to install SBo things?
Quote:
Originally Posted by SAJM View Post
It was a few years ago but as far as I remember, yes.
Can you explicitly check if you have the tk package installed? The tk package that you can see here: https://slackware.uk/slackware/slack...ackware64/tcl/

Quote:
Originally Posted by SAJM
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
Please, you don't `python -m tkinter` INSIDE a Python interactive session, thisi s a shell command. Since this is not obvious to you, IMHO you're just complicating your life a lot by using an outdated version of Slackware where you need to install Python 3 as third party.

I assume you're a casual Slackware user? How much sense does it make to you to just install Slackware 15.0 (it's already like half an year old, it comes with Python3 as well, so you won't have to do that part yourself), properly update it after installing (by upgrading packages from patches/packages, either manually, or with slackpkg), then just install thonny from slackbuilds.org the right way (like I suggested in my first answer in this thread - generate the queue with sqg, then load it in sbopkg and let it do the job)?

Quote:
Originally Posted by SAJM
How do I tell pip to use python3?
You don't "tell pip to use python3". Pip is the Python package manager. For http://slackbuilds.org/repository/14.2/python/python3/ pip comes as part of that package and is named "pip3", to avoid name clashes with "pip" which is the pip for the system Python2 install in vanilla Slackware 14.2 Or you can invoke pip as a module through the python interpreter, for python3 at least, because I don't remember if this is true for python2 as well. Thus `python3 -m pip` would be the same as 'pip3' for the Python3 installed via SBo for Slackware 14.2

Quote:
Originally Posted by SAJM
Here is the problem I think
In situations like this (when you lack enough understanding of the problem) making assumptions is risky. Any wrong assumption that you make and apply will only make matters worse.

Quote:
Originally Posted by SAJM
Do I uninstall python2.
Why would you do that? Uninstalling python2, which is a vanilla 14.2 package, makes your Slackware install not being a full install anymore. And incomplete installs of Slackware most of the time are the main reason why further installing third party software goes wrong. Python3 from SBo that is provided for Slackware 14.2 does not interfere with the default python2 that comes with vanilla Slackware. It is stated explicitly here http://slackbuilds.org/slackbuilds/1...python3/README

Quote:
Originally Posted by SAJM
Not sure what this is telling me?

Code:
bash-4.3# sbofind pip
sbofind is yet another third party frontend to SBo, not even related to sbopkg. By involving it in this context, you're adding yet another layer of complexity and confusion. You don't need to look for pip on SBo. See what I wrote about pip vs pip3 above.

Quote:
Originally Posted by SAJM
That's it. I'm defeated
Good. Feel free to consider my suggestion above then. About moving to Slackware 15.0, starting from scratch, and do things the right way, not the way you think it's right.

Quote:
Originally Posted by SAJM
I could uninstall Python 2 but as I mentioned earlier I'm nervous about messing something else up that may be depending on it.
The chances are very high that you will break some other vanilla packages that depend on it. This is the main reason why running full vanilla Slackware installs is the norm.

Quote:
Originally Posted by SAJM
However when I do this:

Code:
bash-4.3# which tk
which: no tk in (/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin)
Why would you do this? tk is a package name. which looks for commands.
 
1 members found this post helpful.
Old 07-02-2022, 01:13 PM   #54
SAJM
Member
 
Registered: Nov 2012
Location: Essex UK
Distribution: Slackware 15
Posts: 269

Original Poster
Rep: Reputation: Disabled
There is no pip3 in Slackbuild
a search of pip3 usually reverts to just pip

If there is a pip3 out there I cannot find it.
 
Old 07-02-2022, 01:34 PM   #55
SAJM
Member
 
Registered: Nov 2012
Location: Essex UK
Distribution: Slackware 15
Posts: 269

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by FlinchX View Post


Feel free to consider my suggestion above then. About moving to Slackware 15.0, starting from scratch, and do things the right way, not the way you think it's right.
Yes, I believe that is the route to take.
I will burn a disk tomorrow and back up that which is necessary.
 
Old 07-02-2022, 03:18 PM   #56
BrunoLafleur
Member
 
Registered: Apr 2020
Location: France
Distribution: Slackware
Posts: 401

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
At the beginning of the thread you had pip3. But you have upgraded pip, and I have seen a thread that was saying that upgrading pip remove pip3 (I don't remenber where). The remedy is to reinstall the python3 package.

Else there is everything in Slackware 15 like was said above.
 
Old 07-02-2022, 03:38 PM   #57
SAJM
Member
 
Registered: Nov 2012
Location: Essex UK
Distribution: Slackware 15
Posts: 269

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BrunoLafleur View Post
At the beginning of the thread you had pip3. But you have upgraded pip, and I have seen a thread that was saying that upgrading pip remove pip3 (I don't remenber where). The remedy is to reinstall the python3 package.

Else there is everything in Slackware 15 like was said above.
I thought I had pip3 but never did.

I do wonder if anyone has ever got thonny to work with python3.

What gets me is that python is used as a learning tool. Good luck with that.

Lets see what tomorrow brings with 15.0 installed.
 
Old 07-02-2022, 04:23 PM   #58
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
As it is Slackware, I would go FlinchX path.

First build the queue with sqg -p

Then install it via sbopkg -i

And enjoy

Edit : what about env ?
 
Old 07-02-2022, 04:28 PM   #59
SAJM
Member
 
Registered: Nov 2012
Location: Essex UK
Distribution: Slackware 15
Posts: 269

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tonus View Post
As it is Slackware, I would go FlinchX path.

First build the queue with sqg -p

Then install it via sbopkg -i

And enjoy

Edit : what about env ?
I will upgrade. I was puting it off so this has forced my hand

Last edited by SAJM; 07-02-2022 at 04:30 PM.
 
Old 07-02-2022, 06:32 PM   #60
SAJM
Member
 
Registered: Nov 2012
Location: Essex UK
Distribution: Slackware 15
Posts: 269

Original Poster
Rep: Reputation: Disabled
Going back to python3. It clearly does not work.


On this site I looked at, pip and pip3 seem to be mixed up on the same command strings.

https://help.dreamhost.com/hc/en-us/...ython3-modules

Here is another one

https://stackoverflow.com/questions/...-with-python-3

It's now clear to me that pip3 might well be the version but in a command string it's pip, which is exactly what I was doing.

No wonder I was getting confused!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Learn to code with Thonny -- a Python IDE for beginners LXer Syndicated Linux News 0 02-19-2018 05:21 AM
When Centos 6.3 starting,All services starting OK and starting Atd: OK .And stop scr. DeSouffle Linux - General 4 08-29-2013 12:46 AM
[SOLVED] Starting File System .. Starting File System .. Starting File System .. Starting File rmknox Linux - Newbie 3 08-15-2010 11:30 PM
Starting apps after starting xfce?? gtgoku Slackware 2 08-21-2004 01:49 PM
starting kpppd w/ ximian or starting ximian w/ kde ergo_sum Linux - Newbie 8 12-02-2003 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration