Find extraneous pip packages not listed in your requirements.txt or as a sub-dependency.
NOTICE: This software supports pip <= 20.3.4. Arrai Innovations is no longer actively developing or maintaining this software. We recommend users look at pipenv, poetry, or PDM for package management; extraneous has become extraneous.
$ pip install extraneous
$ extraneous.py -h
usage: extraneous.py [-h] [--verbose] [--include paths] [--exclude names]
[--full]
Identifies packages that are installed but not defined in requirements files.
Prints the 'pip uninstall' command that removes these extraneous packages and
any non-common dependencies. Looks for packages matching '*requirements*.txt'
in the current working directory.
optional arguments:
-h, --help
show this help message and exit
--verbose, -v
Prints installed site-package folders and requirements files.
--include paths, -i paths
Additional directories to look for '*requirements*.txt' files in.
--exclude names, -e names
Package names to not consider extraneous. ['extraneous', 'pipdeptree',
'pip', 'setuptools'] are not considered extraneous packages.
--full, -f
Allows ['extraneous', 'pipdeptree', 'pip', 'setuptools'] as extraneous
packages.
$ extraneous.py
extraneous packages:
smbprotocol
uninstall via:
pip uninstall -y smbprotocol cryptography dataclasses pyspnego
- Clone the repo.
- Setup and activate a new venv.
- Install
requirements.txt
into your venv.
- Install
test_requirements.txt
into your venv. - Run
$ python setup.py test
.
- Install
build_requirements.txt
into your venv. - Run
$ python setup.py bdist_wheel
. - Run
$ twine upload dist/*t
.