UpgradePipPkgs
Tool for upgrading all
pippackages within a Python environment using just one command.
About
-
UpgradePipPkgscan upgrade all of yourpippackages using one of two methods:Method 1:
First gather all outdated packages using the command
pip list --outdated, then pass results to a list of outdated packages to be upgraded.- This method is generally more efficient than the following method, as only outdated packages are passed to upgrade process.
- Unfortunately doesn't take into account package dependencies relying on specific package versions to function properly.
Method 2:
Iterate over all installed packages, passing the command
pip install --upgrade {pkgname}over each one.- This method takes more time overall, but is "safer".
- "Safer" in this context means that package dependencies are corrected upon attempting upgrade on a package that specifies its dependencies, downgrading specific package versions where necessary.
- Note that not all packages will be able to downgrade, as the order of packages upgraded is relevant to whether incorrect version dependencies are corrected.
- For example, let's assume
PackArequiresPackB<=1.0.0as a dependency:PackAwill be checked for available upgrade first, and will check for installed dependency pkgPackB<=1.0.0, installing it if not already installed.PackBis then checked, and has a new version available,1.1.0.PackB-1.0.0is then upgraded to1.1.0, but nowPackAcan't function correctly due to incorrect dependency version.- This can easily be fixed by reinstalling
PackAusing thepipinstall command: "pip install PackA".
- For example, let's assume
-
You can review past results/program output in the application's log file, which can be found here:
"~/UpgradePipPkgs/logs/pip_pkg_upgrade_log.log"
Installation
Using PIP (Recommended)
Easiest method. Highly recommended over manual installation.
-
To install
UpgradePipPkgsusingpip, enter the following in your commandline environment:pip install UpgradePipPkgs
-
You should now be able to import/run
UpgradePipPkgswithin your python environment by entering the following:>>> from UpgradePipPkgs import upgrade_pip_pkgs # <-- Import UpgradePipPkgs >>> upgrade_pip_pkgs() # <-- start program ...
-
Done!
Manual Installation
Not recommended.
-
Before use, navigate to intended installation location, and create a new directory.
-
Clone repository with the git client of your preference.
-
Install all dependencies for this package within said directory by entering the following:
pip install -r requirements.txt
- (Optional) move installation directory to
"~/path/to/Python/Libs/site_packages"to be able to import this package to a Python program like any other importable package.
Done!
Usage
-
If installed using
pip, you can start UpgradePipPkgs by entering the following command in your commandline environment:upgrade-pip-pkgs
-
In order to use
UpgradePipPkgswithin a Python program, start by importing the module to your Python environment:>>> from UpgradePipPkgs import upgrade_pip_pkgs
-
Call the
upgrade_pip_pkgsfunction to start the application, and choose the method of operation by typing the option number, and press [ENTER].>>> upgrade_pip_pkgs()
-
Follow the on-screen prompts to complete the upgrade process.
Contact the Author
- If you have any questions, comments, or concerns that cannot be alleviated through the project's GitHub repository "issues" tab, please feel free to contact me through my email address:
schloppdaddy@gmail.com
Metadata
Release files for UpgradePipPkgs 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| UpgradePipPkgs-0.4.1.tar.gz | 1.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| UpgradePipPkgs-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / UpgradePipPkgs-0.4.1.tar.gz
| Download URL | UpgradePipPkgs-0.4.1.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66bb7d58975755d6595dfc1725c9a030263c41a9007481599cf0d4daa217ed84
|
|
BLAKE2b-256 checksum How to use checksums |
22ac190ce9ce265ec60909a3a4939b7f25c118e6341505d53b2eb5cd2a2ab8a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / UpgradePipPkgs-0.4.1-py3-none-any.whl
| Download URL | UpgradePipPkgs-0.4.1-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
379abf915f0e34c7b6e8eeaac20475ed7428cf0b1d360f88efaa7913c3b63709
|
|
BLAKE2b-256 checksum How to use checksums |
c3f7a255f75b15c867bc2a9cd98536d085f10b0f1b040944a231eb23c8b94617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|