Skip to main content

pipr

Tool to pip install missing imports and more

Build Status

https://img.shields.io/travis/yahoo/pipr.svg https://coveralls.io/repos/yahoo/pipr/badge.svg https://img.shields.io/pypi/dm/pipr.svg https://img.shields.io/pypi/v/pipr.svg https://img.shields.io/pypi/pyversions/pipr.svg https://img.shields.io/badge/license-New%20BSD-blue.svg Documentation Status

Description

pipr can install missing dependencies for any Python file and generate a requirements.txt file, so that YOU don’t have to worry about searching for and installing the dependencies manually

Requirements

pipr supports both Python 2.7, and Python 3.4

Installation

To install pipr, simply:

$ pip install pipr

Usage

$ pipr -h
usage: pipr [-h] [-r] [-d] [-R] filepath

positional arguments:
filepath            The path to the Python file

optional arguments:
    -h, --help          show this help message and exit
    -r, --requirements  Add --requirements to generate a requirements.txt
                        file in current directory
    -d, --debug         Add --debug to see debug output
    -R, --recursive     Add --recursive to handle project-wide dependency
$ cat test.py
import argparse
import sshmap, redislite
import urllib2
import sbi
# import commentimp
from time import sleep
'''
import commentimp2
'''

$ pipr test.py -d -r
Imported packages: argparse, sshmap, redislite, urllib2, sbi, time
Missing packages installed: sshmap==0.6.90, sbi==0.0.7

Because we added -r, there will a requirements.txt file generated in the current directory.

More Information

Metadata

Release files for pipr 0.0.50

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

Built distribution (wheel)

Table of built distributions (wheels) for pipr 0.0.50
File Interpreter ABI Platform
pipr-0.0.50-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / pipr-0.0.50-py2.py3-none-any.whl

Download URL pipr-0.0.50-py2.py3-none-any.whl
Size 10.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
906ef806c014ac5e9c6f4d0ea89b7ee80a59c868ef8ee235ff4f5ad959afa48a
BLAKE2b-256 checksum
How to use checksums
0e97ddf53954fe041acb814571113b419430b9c69265cfa9be3356e0b90940f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.50 This release

1 release file

0.0.48

1 release file

0.0.46

2 release files

0.0.38

2 release files

0.0.36

2 release files

0.0.34

2 release files

0.0.32

0.0.28

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