ERROR: Slooooow dooooown... this page load was delayed.


python - An interpreted, interactive, object-oriented programming language ChangeLog

HOWTO


# Python
# ======
# Below are general details about installing Python, and here are the
# version-specific HOWTOs:
#
# Python 2.7.x
# Python 3.8.x
# Python 3.9.x

# Slackware packages:
#
# Slackware 14.0: python 2.7.3
# Slackware 14.1: python 2.7.5
# Slackware 14.2: python 2.7.11
# Slackware 15.0: python2 2.7.18, python3 3.9.10
#
# Some of them include security-patched versions in 'patches'.
#
# Slackware 9.1 and up also include 'python-demo' and 'python-tools'
# packages, but they were merged back into 'python' in 11.0
#
# Slackware 14.2 and up include python-pillow (instead of pil) and
# python-setuptools packages.  Those are covered here:
# PIL
# setuptools

# If you are using Mailman, certbot, or other Python based software,
# always check supported Python versions before installing.

# If you are using Mailman 2.x, you need Python 2.7
# If you are using Mailman 3.x, you need Python >= 3.4 for the core and
# 2.7 for the web UI and archiver (it may be >= 3.x for all now, it's been a
# while)

# As long as your shebang (1st line of a script) uses the path to the
# specific version, you should be able to have multiple major versions of
# Python installed.
#
# #!/usr/bin/python2
# #!/usr/bin/python2.7
# #!/usr/bin/python3
# #!/usr/bin/python3.8
# #!/usr/bin/python3.9
#
# If you have multiple versions of Python installed, and will be actively
# using them, you should also run programs like 'pip' as the specific
# version, like 'pip2.7', 'pip3', 'pip3.9', or run it like this:
# /usr/bin/python3.9 -m pip install --upgrade pip

# If you are upgrading from Python 2.x to 3.x, read:
# Should I use Python 2 or Python 3 for my development activity?
# Sunsetting Python 2
# How to port Python 2 Code to Python 3
# 2to3 - Automated Python 2 to 3 code translation
# Python 2.x is EoL, or sunsettededed as of January 1, 2020.
# You should always use Python 3.x

# I don't do this when upgrading from one minor version to another (3.9.20 to
# 3.9.21), but when I upgrade from one major version to another (3.8.x to
# 3.9.x) I sometimes like to blow everything away from the old version(s) to
# make sure there aren't old files lying around that will cause problems
# later.
#
# This is generally not needed, binaries will be named something like
# /usr/bin/python3.9 and /usr/bin/python will be a symlink to that, each one
# will have it's own /usr/lib64/pythonX.X
# Unless you have an embedded system that is tight on disk space, I wouldn't
# worry about it.  If you do want to, skip down to the bottom if you want to
# zap everything before proceeding ...which may break lots of things for you
# that are running now or that were installed when there was an older version
# of Python.

# Prerequisites:
# OpenSSL (for Python's socket module)
# pkg-config
# Tcl/Tk (for _tkinter)

# List of some things that I reinstall or at least verify that they still
# work, after upgrading from one major version to another.
#
# This will give you an idea of some that are part of a Slackware package
# as well:
#
#   grep site-packages /var/adm/packages/* | cut -d: -f1 | sort | uniq
#
# BitTorrent and dnspython
# certbot
# cracklib
# D-BUS and Pyrex
# fetchmail's fetchmailconf
# file's Python bindings (see the bottom)
# gcalcli
# gnome-python
# HPLIP
# kdebindings
# libieee1284
# libxml2
# libxslt
# linkchecker and psyco
# mysql-python
# newt seems to be the owner of _snackmodule.so and snack.*
# PIL (pil/python-pillow)
# gnome-menus (GMenuSimpleEditor)
# pycairo
# pycrypto
# PyGTK
# PyOpenGL
# pyorbit (CORBA.py*, ORBit.*, PortableServer.*)
# PyQT and sip
# pyao, pyvorbis
# Pyzor (in the MIMEDefang howto)
# ReportLab (in the gramps howto)
# Revelation
# vte
# wxPython


# If you ever want to uninstall Python, this should do it:
# (stick to *.* to avoid matching python-thisname, python-thatname ...)
cd
su
for pfx in /usr /usr/local; do
  ( cd ${pfx}/bin
    rm -f 2to3 pip pip2 pip3 pydoc pydoc2 pydoc3 \
     python python-config python2 python2-config python3 python3-config )
  find ${pfx}/bin -type l -name "python?" -exec rm {} \;
  find ${pfx}/bin -type l -name "python?-config" -exec rm {} \;
  find ${pfx}/bin -type f -name "python?.*-config" -exec rm {} \;
  find ${pfx}/bin -type f -name "pip?.?" -exec rm {} \;
  find ${pfx}/bin -type f -name "pydoc?.?" -exec rm {} \;'
  find ${pfx}/include -maxdepth 1 -type d -name "python*.*" \
   -exec rm -r {} \; 2> /dev/null
  find ${pfx}/{lib,lib64} -maxdepth 1 -type d -name "python*.*" \
   -exec rm -r {} \; 2> /dev/null
  find ${pfx}/{lib,lib64} -maxdepth 1 -type l -name "libpython*.so" \
   -exec rm {} \; 2> /dev/null
  find ${pfx}/{lib,lib64} -maxdepth 1 -type f -name "libpython*.so.*" \
   -exec rm {} \; 2> /dev/null
  find ${pfx}/{lib,lib64}/pkgconfig -name "python*.pc" -exec rm {} \;
  test -d ${pfx}/man/man1 &&
   ( cd ${pfx}/man/man1 ; rm -f python.1 python2.1 python3.1 )
  find ${pfx}/man/man1 -type f -name "python*.1" -exec rm {} \;
done
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "Python-*" -exec rm -r {} \;
rm -f ~/installed/Python-*.tar.* ~/installed/Python-*.tgz

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2024-12-04 2:30pm
Copyright © 2001-2025 Jason Englander. All Rights reserved.
[HTML5]