Skip to main content

:snake: pyenvcomp

The python virtual environment comparator tool. Compare two python virtualenvs and find out the differences.

Installation

pip install pyenvcomp

Usage

compare path1 path2 --display [all|diff|separate]

path1 - path to one virtual environment.

path2 - path to another virtual environment.

List of display types available:

  1. all - displays all the differences, similarities and extra modules in each virtual environments. This is the default display option.
  2. diff - displays just the list of modules which are present in both the virtual environments but have different versions.
  3. separate - displays two different tables of extra modules in each virtual environments.
usage: compare [-h] [-d DISPLAY] env path1 env path2

positional arguments:
  env path1             location of the first virtual environment
  env path2             location of the second virtual environment

optional arguments:
  -h, --help            show this help message and exit
  -d DISPLAY, --display DISPLAY
                        Compare envs based on either of these available options [all|diff|separate]

:man_technologist: Example

Input:

compare /home/koustav/Documents/test_env_1 /home/koustav/Documents/test_env_2 --display all

where, test_env_1 and test_env_2 are two python virtual environments.

Output:

SAME MODULE VERSIONS
╔═════════════════╤═══════════════════════╤═══════════════════════╗
║ Module          │ test_env_1(python3.8) │ test_env_2(python3.8) ║
╠═════════════════╪═══════════════════════╪═══════════════════════╣
║ appdirs         │ 1.4.3                 │ 1.4.3                 ║
║ CacheControl    │ 0.12.6                │ 0.12.6                ║
║ certifi         │ 2019.11.28            │ 2019.11.28            ║
║ chardet         │ 3.0.4                 │ 3.0.4                 ║
║ colorama        │ 0.4.3                 │ 0.4.3                 ║
║ contextlib2     │ 0.6.0                 │ 0.6.0                 ║
║ distlib         │ 0.3.0                 │ 0.3.0                 ║
║ distro          │ 1.4.0                 │ 1.4.0                 ║
║ html5lib        │ 1.0.1                 │ 1.0.1                 ║
║ idna            │ 2.8                   │ 2.8                   ║
║ ipaddr          │ 2.2.0                 │ 2.2.0                 ║
║ lockfile        │ 0.12.2                │ 0.12.2                ║
║ msgpack         │ 0.6.2                 │ 0.6.2                 ║
║ packaging       │ 20.3                  │ 20.3                  ║
║ pep517          │ 0.8.2                 │ 0.8.2                 ║
║ pip             │ 20.0.2                │ 20.0.2                ║
║ pkg_resources   │ 0.0.0                 │ 0.0.0                 ║
║ progress        │ 1.5                   │ 1.5                   ║
║ pyparsing       │ 2.4.6                 │ 2.4.6                 ║
║ python_dateutil │ 2.8.1                 │ 2.8.1                 ║
║ pytoml          │ 0.1.21                │ 0.1.21                ║
║ pytz            │ 2020.1                │ 2020.1                ║
║ requests        │ 2.22.0                │ 2.22.0                ║
║ retrying        │ 1.3.3                 │ 1.3.3                 ║
║ setuptools      │ 44.0.0                │ 44.0.0                ║
║ six             │ 1.14.0                │ 1.14.0                ║
║ urllib3         │ 1.25.8                │ 1.25.8                ║
║ webencodings    │ 0.5.1                 │ 0.5.1                 ║
║ wheel           │ 0.34.2                │ 0.34.2                ║
╚═════════════════╧═══════════════════════╧═══════════════════════╝

DIFFERENT MODULE VERSIONS
╔════════╤═══════════════════════╤═══════════════════════╗
║ Module │ test_env_1(python3.8) │ test_env_2(python3.8) ║
╠════════╪═══════════════════════╪═══════════════════════╣
║ numpy  │ 1.19.2                │ 1.19.1                ║
║ pandas │ 1.1.2                 │ 1.1.3                 ║
╚════════╧═══════════════════════╧═══════════════════════╝

ONLY IN test_env_1 (python3.8)
╔═══════════════════════╤═════════╗
║ test_env_1(python3.8) │ version ║
╠═══════════════════════╪═════════╣
║ wrapt                 │ 1.12.1  ║
║ pikepdf               │ 1.19.3  ║
║ lazy_object_proxy     │ 1.4.3   ║
║ pylint                │ 2.6.0   ║
║ toml                  │ 0.10.1  ║
║ Pillow                │ 7.2.0   ║
║ lxml                  │ 4.5.2   ║
║ astroid               │ 2.4.2   ║
║ isort                 │ 5.6.4   ║
║ mccabe                │ 0.6.1   ║
╚═══════════════════════╧═════════╝

ONLY IN test_env_2 (python3.8)
╔═══════════════════════╤═════════╗
║ test_env_2(python3.8) │ version ║
╠═══════════════════════╪═════════╣
║ Werkzeug              │ 1.0.1   ║
║ MarkupSafe            │ 1.1.1   ║
║ tornado               │ 6.0.4   ║
║ itsdangerous          │ 1.1.0   ║
║ click                 │ 7.1.2   ║
║ Flask                 │ 1.1.2   ║
║ Jinja2                │ 2.11.2  ║
╚═══════════════════════╧═════════╝

Visuals in the terminal would look slightly different than the above output visual.

Future versions

In the upcoming versions following features will be added:

  • Compare directly from requirements.txt file
  • Warning messages will be provided if any deprecated version of any module is being used.

Inspired by problems faced while doing R&D at my workplace! :nerd_face:

Release files for pyenvcomp 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyenvcomp 1.0.3
File Size Uploaded
pyenvcomp-1.0.3.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyenvcomp 1.0.3
File Interpreter ABI Platform
pyenvcomp-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / pyenvcomp-1.0.3.tar.gz

Download URL pyenvcomp-1.0.3.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9030560397c93d60dc952eb5896d08a84c12bdda24c08a2e22135ad55ca310ab
BLAKE2b-256 checksum
How to use checksums
528f3a8efc18c4476d08220d21db0cd3c7142ec6b4451ea37a5a78e0e73a5f4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release files / pyenvcomp-1.0.3-py3-none-any.whl

Download URL pyenvcomp-1.0.3-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53fd763ec3c581175074a2dc27fc7201db8c917e9f91980391725e58a1fae726
BLAKE2b-256 checksum
How to use checksums
f99cfd1ffecd0375dbc8b7312ede47cbe177de57dbbda99a7abd0a0dcbc5c08f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page