Giter Club home page Giter Club logo

pef's Introduction

pef

Enhancement for pip uninstall command, that it removes all dependencies of an uninstalled package.

https://asciinema.org/a/YlzQlq8TSaIs9NcVA9r9uN07L.png

☤ Quickstart

Uninstall package, e.g, qu:

$ pef qu -y

Uninstall multiple packages, e.g, qu, gy:

$ pef qu gy -y

☤ Installation

You can install "pef" via pip from PyPI:

$ pip install pef

☤ Usage

$ pef --help
Usage: pef [OPTIONS] [PACKAGES]...

  Uninstall packages with all its dependencies.

Options:
  -y, --yes  Don't ask for confirmation of uninstall deletions.
  --help     Show this message and exit.

pef's People

Contributors

cls1991 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

Watchers

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

pef's Issues

AttributeError: module 'pip' has no attribute 'get_installed_distributions'

$ pip -V
pip 18.1

$ pef bpython
Traceback (most recent call last):
  File "/media/work/target_win/venv/bin/pef", line 11, in <module>
    sys.exit(cli())
  File "/media/work/target_win/venv/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/media/work/target_win/venv/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/media/work/target_win/venv/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/media/work/target_win/venv/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/media/work/target_win/venv/lib/python3.7/site-packages/pef.py", line 104, in cli
    pkg = pip.get_installed_distributions()
AttributeError: module 'pip' has no attribute 'get_installed_distributions'

It seems like new pip doesn't support get_installed_distributions: pypa/pip#5243

Warning virtual environment

I tried pef pyrebase from within my virtual environment and this is what I get:

(venv3) (base) ***bla bla bla*** % pef pyrebase
Warning! You are not in an active virtual environment. This may purge system-level packages!

supporting conda environments

Can you add conda environment support?
per this post:

This works:

import sys, os
is_conda = os.path.exists(os.path.join(sys.prefix, 'conda-meta'))

verified it on a conda environment with python 2.7 and python 3.6

Listing dependencies

I hope pef can list dependencies of a package, but not directly removing them.

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.