GithubHelp home page GithubHelp logo

ambitioninc / pip-conflict-checker Goto Github PK

View Code? Open in Web Editor NEW
75.0 17.0 15.0 27 KB

A tool that checks installed packages against all package requirements to ensure that there are no dependency version conflicts.

License: Other

Python 100.00%

pip-conflict-checker's Introduction

Build Status pip-conflict-checker

A tool that checks installed packages against all package requirements to ensure that there are no dependency version conflicts.

Installation

pip install pip-conflict-checker

Usage

Simply run the command pipconflictchecker. If any dependency conflicts are found an output dump of all conflicts will be shown, and an exit code of 1 will be returned.

pip-conflict-checker's People

Contributors

jaredlewis avatar kami avatar somewes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pip-conflict-checker's Issues

Broken with pip 10.0.0b2

A method have been removed from pip:

File "/tmp/64/1/459755/3208/e4a8b5e71641f249/src/venv/lib/python3.5/site-packages/pipconflictchecker/checker.py", line 279, in main
--
conflicts = checker.get_conflicts()
File "/tmp/64/1/459755/3208/e4a8b5e71641f249/src/venv/lib/python3.5/site-packages/pipconflictchecker/checker.py", line 244, in get_conflicts
requirement_versions = self.get_requirement_versions()
File "/tmp/64/1/459755/3208/e4a8b5e71641f249/src/venv/lib/python3.5/site-packages/pipconflictchecker/checker.py", line 208, in get_requirement_versions
distributions = pip.get_installed_distributions()
AttributeError: module 'pip' has no attribute 'get_installed_distributions'

pip check

@jaredlewis I just discovered that pip 9.0 introduces "pip check". I tried using ambition conflict checker for something that was an obvious conflict in a requirements file, but it didn't catch it. pip check found it though and prints a pretty error message. Just wanted to put this here so it's known

Conflict - Checker has a conflict.

max@myepanes-bmc:$ uname -a
Linux myepanes-bmc 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
max@myepanes-bmc:
$ which python
/usr/bin/python
max@myepanes-bmc:~$ python --version
Python 2.7.15rc1



max@myepanes-bmc:~$ pip install pip-conflict-checker
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
/usr/local/lib/python2.7/dist-packages/pip/_internal/req/req_install.py:391: UserWarning: Unbuilt egg for Unknown [unknown version] (/usr/local/lib/python2.7/dist-packages)
  self.satisfied_by = pkg_resources.get_distribution(str(no_marker))
Collecting pip-conflict-checker
  Downloading https://files.pythonhosted.org/packages/e5/7c/95274595d86edb21a718bbe2f881d7852df59cd11cbf9880f6b8150b7d19/pip_conflict_checker-0.5.0-py2-none-any.whl
Collecting flake8 (from pip-conflict-checker)
  Downloading https://files.pythonhosted.org/packages/e9/76/b915bd28976068a9843bf836b789794aa4a8eb13338b23581005cd9177c0/flake8-3.7.7-py2.py3-none-any.whl (68kB)
    100% |████████████████████████████████| 71kB 734kB/s 
Requirement already satisfied: pip>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from pip-conflict-checker) (19.0.3)
Collecting coverage (from pip-conflict-checker)
  Downloading https://files.pythonhosted.org/packages/af/cf/e240715a50d64b0538a08a2be1ae4060fb25791e911cbe8fd2367b5deeaa/coverage-4.5.2-cp27-cp27mu-manylinux1_x86_64.whl (201kB)
    100% |████████████████████████████████| 204kB 2.1MB/s 
Collecting mock>=1.0.1 (from pip-conflict-checker)
  Downloading https://files.pythonhosted.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 13.3MB/s 
Requirement already satisfied: nose>=1.3.0 in /usr/local/lib/python2.7/dist-packages (from pip-conflict-checker) (1.3.7)
Requirement already satisfied: configparser; python_version < "3.2" in /usr/local/lib/python2.7/dist-packages (from flake8->pip-conflict-checker) (3.7.3)
Requirement already satisfied: enum34; python_version < "3.4" in ./.local/lib/python2.7/site-packages (from flake8->pip-conflict-checker) (1.1.6)
Collecting entrypoints<0.4.0,>=0.3.0 (from flake8->pip-conflict-checker)
  Using cached https://files.pythonhosted.org/packages/ac/c6/44694103f8c221443ee6b0041f69e2740d89a25641e62fb4f2ee568f2f9c/entrypoints-0.3-py2.py3-none-any.whl
Requirement already satisfied: functools32; python_version < "3.2" in /usr/local/lib/python2.7/dist-packages (from flake8->pip-conflict-checker) (3.2.3.post2)
Requirement already satisfied: typing; python_version < "3.5" in /usr/local/lib/python2.7/dist-packages (from flake8->pip-conflict-checker) (3.6.6)
Collecting pycodestyle<2.6.0,>=2.5.0 (from flake8->pip-conflict-checker)
  Downloading https://files.pythonhosted.org/packages/0e/0c/04a353e104d2f324f8ee5f4b32012618c1c86dd79e52a433b64fceed511b/pycodestyle-2.5.0-py2.py3-none-any.whl (51kB)
    100% |████████████████████████████████| 51kB 1.8MB/s 
Collecting pyflakes<2.2.0,>=2.1.0 (from flake8->pip-conflict-checker)
  Downloading https://files.pythonhosted.org/packages/84/f2/ed0ffb887f8138a8fe5a621b8c0bb9598bfb3989e029f6c6a85ee66628ee/pyflakes-2.1.1-py2.py3-none-any.whl (59kB)
    100% |████████████████████████████████| 61kB 14.5MB/s 
Collecting mccabe<0.7.0,>=0.6.0 (from flake8->pip-conflict-checker)
  Downloading https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from mock>=1.0.1->pip-conflict-checker) (1.0.2)
Requirement already satisfied: six>=1.9 in ./.local/lib/python2.7/site-packages (from mock>=1.0.1->pip-conflict-checker) (1.12.0)
Requirement already satisfied: pbr>=0.11 in /usr/local/lib/python2.7/dist-packages (from mock>=1.0.1->pip-conflict-checker) (5.1.3)
Error checking for conflicts.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/commands/install.py", line 503, in _warn_about_conflicts
    package_set, _dep_info = check_install_conflicts(to_install)
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/check.py", line 108, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/check.py", line 47, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2589, in version
    raise ValueError(tmpl % self.PKG_INFO, self)
ValueError: ("Missing 'Version:' header and/or METADATA file", Unknown [unknown version] (/usr/local/lib/python2.7/dist-packages))
Installing collected packages: entrypoints, pycodestyle, pyflakes, mccabe, flake8, coverage, mock, pip-conflict-checker
Successfully installed coverage-4.5.2 entrypoints-0.3 flake8-3.7.7 mccabe-0.6.1 mock-2.0.0 pip-conflict-checker-0.5.0 pycodestyle-2.5.0 pyflakes-2.1.1
max@myepanes-bmc:~$ pipconflictchecker
Traceback (most recent call last):
  File "/usr/local/bin/pipconflictchecker", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/pipconflictchecker/checker.py", line 279, in main
    conflicts = checker.get_conflicts()
  File "/usr/local/lib/python2.7/dist-packages/pipconflictchecker/checker.py", line 244, in get_conflicts
    requirement_versions = self.get_requirement_versions()
  File "/usr/local/lib/python2.7/dist-packages/pipconflictchecker/checker.py", line 208, in get_requirement_versions
    distributions = pip.get_installed_distributions()
AttributeError: 'module' object has no attribute 'get_installed_distributions'

Not working in Python 3.5 virtualenv

I'm getting the following error when running pipconflictchecker:

File "pyenv/lib/python3.5/site-packages/pipconflictchecker/checker.py", line 279, in main
File "pyenv/lib/python3.5/site-packages/pipconflictchecker/checker.py", line 244, in get_conflicts
File "pyenv/lib/python3.5/site-packages/pipconflictchecker/checker.py", line 208, in get_requirement_versions
"AttributeError: module 'pip' has no attribute 'get_installed_distributions"

pip is in ./pyenv/lib/python3.5/site-packages (19.1.1)

[WARNING]Methods in checker will be deprecated

env: python 3.9
os: macos 13.0.1
replay: run pipconflictchecker in terminal
show: init.py:122: PkgResourcesDeprecationWarning: 5.0.* is an invalid version and will not be supported in a future release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.