LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 01-18-2020, 10:26 PM   #1
silverlining
Member
 
Registered: Jan 2020
Location: Oregon, U.S.A.
Distribution: Slackware64 ver 15.0
Posts: 99

Rep: Reputation: 19
Package upgrade outside of slackpkg using pip confuses package database


This is my first post. I have Slackware 14.2 64-bit. I needed to have pip, which for some reason isn't included with the full install. I downloaded pip 9.0.3 from SlackBuilds and installed it using Slackpkg. When I ran 'pip list' to check, it suggested I upgrade to version 19.3.1 via the 'pip install --upgrade pip' command. I did that and a message said that it deleted pip 9.0.3 and installed the new version.

However, running pkgtool showed pip 9.0.3 still installed. Just for curiosity, I used pkgtool to remove the pip 9.0.3 package, which it said it did. But come to find out, it really removed the upgraded one. So pip evidently didn't update the install log (didn't delete the old version and didn't add the new version to the log) but yet the upgraded version 19.3.1 was actually tied to the old version that pkgtool saw and removed. Is there a more correct way to do this so that the package database stays accurate?
 
Old 01-19-2020, 03:01 AM   #2
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
Package upgrade outside of slackpkg using pip confuses package database

Hi and welcome!
For python things that move faster than current, I use virtual environment : it installs a independent python environment in a directory that can be changed without messing with the distribution (nothing touched, rm the folder and everything is gone).

To use it, just use the correct path :
./bin/pip instead of pip for instance.
 
3 members found this post helpful.
Old 01-19-2020, 05:00 PM   #3
silverlining
Member
 
Registered: Jan 2020
Location: Oregon, U.S.A.
Distribution: Slackware64 ver 15.0
Posts: 99

Original Poster
Rep: Reputation: 19
Thank you for your advice. It sounds reasonable. I have a lot to learn regarding setting up python in Linux for different uses.
 
Old 01-20-2020, 07:11 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Just to give you some backstory...

pip is not aware of what distro it is on, nor how packages were installed. When you upgraded pip using pip, it just updated the binaries and required files, but it doesn't know anything about Slackware, pkgtool, or the package database. In the same turn, Slackware, pkgtool, and the package database are not aware of what pip does, so it is not tracking any changes made by pip.

pip installs things that aren't able to be tracked by Slackware, so while it provides a relatively easy to use interface and design, it won't show any potential conflicts with default packages or packages provided by SBo (which they won't use pip at all, so it might overwrite software provided by pip).

Personally, I try and stay away from pip and any other tool that can install programs that aren't tracked by pkgtool. If I need a python tool that isn't provided by SBo, but is available on pip, then I'll either use pip2tgz, which will generate a Slackware package from a package available with pip, or I'll just create my own SlackBuild (although, I know not everyone has the knowledge or desire to do this method).
 
3 members found this post helpful.
Old 01-20-2020, 09:48 PM   #5
silverlining
Member
 
Registered: Jan 2020
Location: Oregon, U.S.A.
Distribution: Slackware64 ver 15.0
Posts: 99

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by bassmadrigal View Post
Just to give you some backstory...
Thank you. I appreciate the information. I have hardly ever added anything outside of Slackware sanctioned but I started working with a python-based app so that's how I ran into that. Normally I try to do everything with pkgtool. And I do want to learn how to make my own tgz packages so that sounds good.
 
Old 01-21-2020, 04:03 PM   #6
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
Package upgrade outside of slackpkg using pip confuses package database

That's why I found virtualenv convenient :
Code:
 
$virtualenv -p /usr/sbin/python3 ./khal
$cd ./khal 
$./bin/pip3 install khal
$./bin/khal
$cd .. 
$rm -fR ./khal
That was : creating an isolated python3 environment. Use it to install some python software. Use the installed software. Wipe completely the isolated env.

When software is mature and do not have to be frequently updated, I borrow a python slackbuild and change it to my needs for the new software.
 
Old 01-21-2020, 07:04 PM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by silverlining View Post
And I do want to learn how to make my own tgz packages so that sounds good.
To make your own Slackware packages, you'll want to get familiar with SlackBuilds. These are scripts that will extract the source, do any required compiling, and then combine it all into a Slackware package.

The first places to start would be the guidelines section on SBo and the SlackBuild page on SlackDocs.
 
1 members found this post helpful.
Old 01-21-2020, 11:30 PM   #8
silverlining
Member
 
Registered: Jan 2020
Location: Oregon, U.S.A.
Distribution: Slackware64 ver 15.0
Posts: 99

Original Poster
Rep: Reputation: 19
@Tonus, It's helpful reading about your experience. I am interested and set up a virtualenv to try with python.

@bassmadrigal, I am fairly familiar with downloading from SlackBuilds and running the scripts to make tgz files. It works very smoothly and I like it, but I feel like I'm cheating. Only once a few years ago did I read up on modifying a generic script, then trying to compile my own tgz from some source code that I found. I can't remember now if it worked out, but I will look into it again very soon. Too many things to do all the time!

Thanks for the tips, you guys!
 
Old 01-22-2020, 03:17 PM   #9
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
Followed the same path!

Useful for experiments with slackbuilds : https://slackbuilds.org/templates/

I started to do dirty things for myself... and proudly submitted my first slackbuilds a few days ago (nothing very valuable, only perl modules, but it just could be useful to have them to have something else done!).
 
  


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
[SOLVED] Slackpkg upgrade-all returns 'no packages to upgrade' after slackpkg-update has downloaded files san2ban Slackware 8 11-01-2019 05:44 AM
LXer: pip Uninstall | Uninstall a Package Installed with pip LXer Syndicated Linux News 0 03-01-2018 10:30 AM
Hello, Bon Jour, Pip Pip SocaSpice LinuxQuestions.org Member Intro 3 11-14-2010 08:22 AM
eth(x) confuses me Cbomb Linux - Networking 3 05-16-2001 10:14 PM

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

All times are GMT -5. The time now is 10:35 PM.

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